XML (Extensible Markup Language) Reader Parameters
The XML Reader works by mapping XML elements into FME features. These mappings are defined by an XML application called xfMap.
By extracting these mapping strategies into an xfMap document, the XML Reader is not tied to any particular XML format. Because of this, the XML Reader can read many disparate XML applications, ranging from GIS data to purchase orders. xfMap is described in more detail in xfMap.
Reader Configuration
Specifies whether to read the XML dataset using an xfMap document or to use an XRS document.
Note: The selected configuration type determines which parameters become available in the dialog.
Sets a limit for the number of data features scanned for determining schema features. This option is useful during workspace generation when processing a very large XML file, and you know that the entire file does not have to be read to completely determine the feature type definitions.
Valid values: any positive number.
Feature Paths Configuration
Specifies which XML elements in the dataset, expressed as xfMap match expressions, should be extracted into features containing XML fragments. Multiple expressions can be separated with whitespace. The fragments are held in non-geometrical FME features under their xml_fragment attribute. For more information about additional attributes added to extracted features, see XFMAP_FEATURE_PATHS, XFMAP_FEATURE_PATHS_EXCEPT.
This parameter is useful for deconstructing large XML documents into parts that may be processed further in XML, XQuery, XSLT or text processing Workbench transformers.
This example extracts the children of the <dc:SearchResults> element from the dataset into XML fragment features:
XML_XFMAP_FEATURE_PATHS “csw:SearchResults/*”
Specifies which XML elements in the dataset, expressed as xfMap match expressions, should be excluded from extraction into features. This parameter is especially useful for match expressions containing wildcard characters. Multiple expressions can be separated with whitespace.
This example excludes extraction of the <csw: metadata> children of the <dc:SearchResults> element from the dataset into XML fragment features:
XML_XFMAP_FEATURE_PATHS_EXCEPT "csw:SearchResults/csw:metadata"
Customize Attributes
This parameter can be specified to extract the children of the matched elements as xml fragments.
For example, If Flatten Options is shipto and this parameter is set to country, then the output feature has an extra attribute xml_fragment_country{0} with its value set to <country>Norway</country>.
This option allows children of the matched elements to be exposed as attributes on FME Features.
See the Structure Element section in the xfMap documentation for details regarding the options available and more examples.
Other Configurations
Specifies the location of the xfMap document. Multiple xfMaps may be specified here.
Specifies the location of an XRS document. An XRS (XML Reader Switch) document allows the XML Reader to automatically configure itself to read "known" XML datasets without the need to specify the appropriate xfMaps in advance.
Continue on Geometry Error
Specifies whether the reader should continue to extract features from the XML dataset after encountering a geometrical error.
Schema Attributes
Use this parameter to expose Format Attributes in Workbench when you create a workspace:
- In a dynamic scenario, it means these attributes can be passed to the output dataset at runtime.
- In a non-dynamic scenario, you can use this parameter to expose additional attributes on multiple feature types.
Use Search Envelope
Using the minimum and maximum x and y parameters, define a bounding box that will be used to filter the input features. Only features that intersect with the bounding box are returned.
If all four coordinates of the search envelope are specified as 0, the search envelope will be disabled.
When selected, this parameter removes any portions of imported features being read that are outside the Search Envelope.
The example below illustrates the results of the Search Envelope when Clip to Search Envelope is not selected (set to No) and when it is selected (set to Yes).
- No: Any features that cross the search envelope boundary will be read, including the portion that lies outside of the boundary.
- Yes: Any features that cross the search envelope boundary will be clipped at the boundary, and only the portion that lies inside the boundary will be read. The underlying function for the Clip to Search Envelope function is an intersection; however, when Clip to Search Envelope is selected, a clipping operation is also performed in addition to the intersection.
Advanced
Specifies whether the input xfMap document should be validated against its Document Type Definition (DTD).
Specifies whether the input XML document should be validated against a Document Type Definition (DTD) or an XML schema.