Writes data to a simple XML file. This node will write the input to the specified file in either XML or HTML format, depending on the specified properties.
All data will be converted to text, and the four control characters will be escaped as " ("), & (&), < (<), and > (>).
Example of properties to generate basic XML:
DocumentHeader:
<?xml version="1.0" encoding="ISO-8859-1"?>
<BRAINDocument>
DocumentFooter:
</BRAINDocument>
RecordHeader: \t<Record>\n
RecordFooter: \t</Record>\n
FieldNames: None
FieldHeader: \t\t<FIELDNAME>
FieldFooter: </FIELDNAME>\n
Example of properties to generate basic XML using attributes to store data values:
DocumentHeader:
<?xml version="1.0" encoding="ISO-8859-1"?>
<BRAINDocument>
DocumentFooter:
</BRAINDocument>
RecordHeader: \t<Record
RecordFooter: />
FieldNames: None
FieldHeader: \40FIELDNAME="
FieldFooter: "
Note that \40 is used to generate a leading space.
Example of properties to generate basic HTML:
DocumentHeader:
<HTML>
<HEAD>
<TITLE>BRAIN HTML Document</TITLE>
</HEAD>
<BODY>
<H1>BRAIN data in HTML form</H1>
<TABLE>
DocumentFooter:
</TABLE>
</BODY>
</HTML>
RecordHeader: \t\t<TR>\n
RecordFooter: \t\t</TR>\n
FieldNames: Name
NameHeader: \t\t\t<TH> NameFooter: </TH>\n
FieldHeader: \t\t\t<TD> FieldFooter: </TD>\n
Using the following DocumentHeader, and saving the file with a .xls extension will allow Microsoft Excel to read in the HTML file as a spreadsheet.
DocumentHeader:
<html xmlns:x="urn:schemas-microsoft-com:office:excel">
<head>
<xml><x:ExcelWorkbook><x:ExcelWorksheets><x:ExcelWorksheet>
<x:Name>BRAIN Format Excel Sheet</x:Name>
<x:WorksheetOptions>
<x:Selected/>
</x:WorksheetOptions>
</x:ExcelWorksheet></x:ExcelWorksheets></x:ExcelWorkbook></xml>
</head>
<body>
<table>
Other fields as in the HTML example above.
Properties
File
Click the folder icon and browse to the XML file to which you want to export the data, then click Choose.
To create a new file, click the folder icon and navigate to the folder where you want to output the file, then enter a name for the file in the Filename field and click Choose.
A value is required for this property.
FieldNames
Optionally specify whether to write a list of field names, as a header line, as the first Record just before the data block. Choose from:
- None - No separate header line, just the data.
- Name - A header record of field names.
- Name:Type - Formatted style <field name>:<data type> header.
If FieldNames is Name or Name:Type, then the NameHeader and NameFooter properties have to be set.
The default value is None.
NullValue
Optionally specify the value to be emitted in place of NULL.
The default value is "0".
DocumentHeader
Optionally specify the HTML to be written at the beginning of the output file.
DocumentFooter
Optionally specify the HTML to be written at the end of the output file.
RecordHeader
Optionally specify the HTML to be written at the beginning of each record. Use \t for tab, \n for Unix-style newline, \r\n for Windows-style newline.
RecordFooter
Optionally specify the HTML to be written at the end of each record. Use \t for tab, \n for Unix-style newline, \r\n for Windows-style newline.
FieldHeader
Optionally specify the HTML to be written at the beginning of each data field. Use \t for tab, \n for Unix-style newline, \r\n for Windows-style newline.
The literal text FIELDNAME will be replaced with the field name, and the literal text FIELDTYPE will be replaced with the data type (string, int, etc.) of that specific data field.
FieldFooter
Optionally specify the HTML to be written at the end of each data field. Use \t for tab, \n for Unix-style newline, \r\n for Windows-style newline.
The literal text FIELDNAME will be replaced with the field name, and the literal text FIELDTYPE will be replaced with the data type (string, int, etc.) of that specific data field.
NameHeader
Optionally specify the HTML to be written at the beginning of each header field. Use \t for tab, \n for Unix-style newline, \r\n for Windows-style newline.
If FieldNames is None, this property is ignored.
NameFooter
Optionally specify the HTML to be written at the end of each header field. Use \t for tab, \n for Unix-style newline, \r\n for Windows-style newline.
If FieldNames is None, this property is ignored.
Inputs and outputs
Inputs: in1
Outputs: None