Read From XML - 23.1


Product type
Product family
Spectrum > Quality > Context Graph
Spectrum > Discovery
Spectrum > Web Services
Spectrum > Spatial > Spectrum Spatial
Spectrum > Quality > Addressing
Spectrum > Dataflow Designer
Spectrum > Geocoding > Enterprise Tax
Spectrum > Data Integration
Spectrum > Quality > Spectrum Quality
Spectrum > Spectrum Platform
Spectrum > GeoEnrichment
Product name
Precisely Spectrum
First publish date

The Read from XML stage reads an XML file into a job or subflow. It defines the file's path and data format, including XML schema and data element details.

Simple XML elements are converted to flat fields and passed on to the next stage. Simple XML data consists of records made up of XML elements that contain only data and no child elements. For example, this is a simple XML data file:

        <country>United States</country>

Notice that in this example each record contains simple XML elements such as <name>, <gender>, <age>, and <country>. None of the elements contain child elements.

The Read from XML stage automatically flattens simple data like this because most stages require data to be in a flat format. If you want to preserve the hierarchical structure, use an Aggregator stage after Read from XML to convert the data to hierarchical data.

Complex XML elements remain in hierarchical format and are passed on as a list field. Since many stages require data to be in a flat format, so you may have to flatten complex XML to make the data usable by downstream stages. See Flattening Complex XML Elements for more information.

Note: Read From XML does not support the XML types xs:anyType and xs:anySimpleType.

Read from XML Options

Option Name


Data file

Specifies the path to the XML data file. Click the File icon to locate the file you want.

Note: If the Spectrum Technology Platform server is running on Linux, remember that file names and paths on these platforms are case sensitive.

Schema file

Displays the path of the selected XML Data file. To select any other file, click the File icon and locate the required XML file. In this case, the schema is inferred based on the structure of the selected XML file.

Alternatively, you can select a schema (XSD) file from the list. When you select an XSD file, the Validate against schema toggle is displayed. Select Yes to validate the XML data file against the selected schema.

Note: If the Spectrum Technology Platform server is running on Linux, remember that file names and paths on these platforms are case sensitive.
XPath Displays the XPath expression for the element or attribute. It is displayed for information purposes only. For more information about XPath, review this page.


Displays a preview of the schema or XML file. When you specify an XSD file, the tree structure reflects the selected XSD. Once you specify both a schema file and a data file, you can click on the schema elements to have a preview of the data that the element contains.

Apply Click this button on the top of the page to save your stage settings.