XMLXQueryExploder
Uses XQuery expression to extract portions of XML text into new FME features.
Parameters
XQuery Type
This parameter identifies the type of the XQuery to be executed. The possible values each correspond to ways of specifying the XQuery. It can be
- directly specified – XQuery expression,
- an attribute on a feature – Attribute specifying an XQuery, or
- a path to a file – XQuery file.
XML Source
This parameter identifies either an attribute that contains an XML document (XML Attribute), or specifies a file that contains an XML document (XML File). You can set this parameter to None (file is specified in query) if the XQuery parameter above refers to an XML file. If this parameter is set, the context document for the query will be set to the value of the parameter (either as a file or a string, as appropriate).
If the XML document is loaded from an attribute, the Remove Source XML Attribute parameter can be set to remove the XML document after the query has been processed.
Results
The Write XML Header parameter specifies whether or not the XML header should be written into the results of the XQuery. Note that for UNICODE files, the Byte Order Mark (BOM) is not written, and should be added by an additional process if desired.
This parameter determines the attribute to which the XQuery results will be written. It is used only when the XML document is an attribute.
For every element in the result set, a feature will be output the QueryResults port with the value of the result set to the attribute specified by this parameter.
If this attribute is set, the text of the query which produced each result will be written to the attribute specified. The default is _source_query.
XQuery Functions
FME provides several functions that can be used within XQuery scripts. These functions allow XQuery scripts to access and manipulate feature attribute values. Currently, there are no functions that allow the manipulation of feature geometry.
Examples
Editing Transformer Parameters
Using a set of menu options, transformer parameters can be assigned by referencing other elements in the workspace. More advanced functions, such as an advanced editor and an arithmetic editor, are also available in some transformers. To access a menu of these options, click beside the applicable parameter. For more information, see Transformer Parameter Menu Options.
Transformer Categories
FME Licensing Level
FME Professional edition and above
Search FME Community
Search for samples and information about this transformer on the FME Community.