XML (Extensible Markup Language) Reader Parameters
The XML Reader works by mapping XML elements into FME features. These mappings can be defined by Feature Paths or by an XML application called xfMap. By allowing the user to configure these mapping strategies, 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 XML messages or metadata. In most cases, Feature Paths is the preferred way to read XML because the user experience is more intuitive and easier to configure.
Reading XML using Feature Paths or xfMaps is described in more detail in xfMap
Reader Configuration

Specifies whether to read the XML dataset using Feature Paths, an xfMap document, or an XRS document.

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 the technical reference section 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 FME 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>.

Flatten options allow children of the matched elements to be exposed as attributes on FME Features.
Exclude XML Fragment Attribute – Specify whether to exclude the xml_fragment attribute when flattening. By default, this is unchecked, therefore the xml_fragment attribute is produced.
See the Structure Element section in the xfMap documentation for details regarding the additional options available and more examples.
Other Configurations

If the Configuration Type parameter is xfMap, this parameter identifies the location of the xfMap document. Multiple xfMap files may be specified here.

If the Configuration Type parameter is XRS, this parameter identifies 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.

If there is no Feature Path or xfMap provided, FME makes a best guess and uses xfMaps it finds internally to try to parse it. However, the results will be unpredictable and the xfMap that FME is attempting to use, if any, will be written in the log. In this case, the XML reader is using the AIXM xfMap to try to read the source data:
INFORM|The XML Reader is using xfMap 'C:\Apps\FME\xml\aixm\aixm_4_5_xfmap.xml'
Continue on Geometry Error

Specifies whether the reader should continue to extract features from the XML dataset after encountering a geometrical error.
General

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 DTD or an XML schema.

Setting this parameter to Yes instructs the underlying XML parser to disable the loading of an external DTD.

This parameter controls whether external entities can be substituted.

- Enabled (default) – A custom entity resolver is used to resolve external entities such as DTDs. The installed custom entity resolver relies on a URI Map that maps incoming URIs to resolved URIs. (The resolved URIs are usually URLs with local copies of the resource.)
- Disabled – If an XML document does not have any external entities that need to be resolved, the Entity Resolver can be set to Disabled. When this parameter is disabled, the URI Map will not be loaded unnecessarily.
Schema Attributes

Additional Attributes to Expose
Use this parameter to expose Format Attributes in FME 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, this parameter allows you to expose additional attributes on multiple feature types. Click the browse button to view the available format attributes (which are different for each format) for the reader.
Use Search Envelope

A search envelope (also known as a bounding box) is a rectangular area that defines a geographic area. In FME, the easiest way to define a search envelope is to use search envelope parameters. Defining a search envelope is the most efficient method of selecting an area of interest because FME will read only the data that is necessary – it does not have to read an entire dataset. Search Envelope parameters apply to both vector and raster datasets and can be particularly efficient if the source format has a spatial index. Most FME readers have parameters to define the search envelope of data that is being read:
The parameters include the x and y coordinates of the bounding box as well as a parameter that defines the coordinate system. How to Define the Bounding Box 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. Note that the bounding box intersection is not a full geometry intersection (based on spatial relationships) that would be returned by a transformer like the SpatialFilter. Note If all four coordinates of the search envelope are left at 0, the search envelope will be disabled even if this option is checked.
|
|||||||
Search Envelope Coordinate System |
Specifies the coordinate system of the search envelope if it is different than the coordinate system of the data. The coordinate system associated with the data to be read must always be set if this parameter is set. If this parameter is set, the minimum and maximum points of the search envelope are reprojected from the Search Envelope Coordinate System to the reader’s coordinate system prior to applying the envelope. |
||||||
Clip to Search Envelope |
The underlying function for Use Search Envelope is an intersection; however, when Clip to Search Envelope is checked, a clipping operation is also performed.
|