XML Generator Transform
The "XML Generator Transform" is used to generate XML from one or more source inputs using an XSD mapped to input columns. It is used for producing hierarchical XML content that will not be stored in a file.
The XML Generator processing occurs in memory, therefore, it is not recommended for large documents.
• Steps - There are two steps
o Map Elements - In this step the right side section will be "Map XML Elements".
o Define Input Relationships - In this step the right window will change to "Map Input Key Columns"
• Use Temporary File - This option is used to relieve memory pressure when using larger datasets. When this option is selected, each buffer is written to a temporary file then is sent to the XML file while reading the next buffer. For extremely large datasets, it is recommended to use the XML Output Destination instead of the transform.
• Use Variable As Path - Select this option to set the Temporary File's path within a variable.
• Location - Defines the path to the Temporary File when not using a variable.
• Use Pretty Formatting - Toggle for output to use line breaks and indentations or a single line (caution: Pretty Formatting can increase file sizes)
• Check Characters - Enabling this option will fail the component when illegal characters will be outputted.
• Omit XML Declaration - The opening XML declaration. <?xml version="1.0" encoding="utf-16"?> is removed.
• Newline On Attributes - All attributes included in the output will be printed on a new line.
• Output Encoding - Selects the output encoding
o UTF8 Without BOM (removes the byte order mark)
• New Line Handling
o Entitize - Replaces new line characters that would not be otherwise preserved with character entities.
o Replace - Replaces new line characters with \r\n.
o None - Leaves the input unchanged.
For more information to determine which handling should be used, please see Microsoft's help file at https://msdn.microsoft.com/en-us/library/system.xml.xmlwritersettings.newlinehandling(v=vs.110).aspx
• Map XML Elements - After selecting the XSD file to use, the field will populated
o XML Data - This is a read only view of the elements and attributes from the XSD
o Group - This is where you will assign sequence elements an input to group the sequence on
o Data - This is where you will map XSD attributes and elements to input columns
• Define Input Relationships - If there are multiple inputs attached to the XML generator transform and your XSD has parent-child sequences, you will need to define input relationships if you mapped inputs to those child sequences.