|On this page|
This node parses XML data and can extract complete elements, attributes or text values into Work Item attributes. The query can be specified using either XPath, or through simplified name-based matching parameters.
Work Item Generation
Whether this node generates static or dynamic work items. You should generally leave this set to "Automatic" unless you know the node’s work items can be computed statically, or that they need to be generated dynamically.
This node always creates dynamic work items: it waits until the upstream work items are known, and generates new work items from the upstream work items.
This node always creates static work items: it creates the number of work items it thinks it needs based on the parameters (and any upstream static items) before the network runs.
If the input is static (a static processor, or a partitioner with only static inputs, or a mapper), this node generates static work items, otherwise it generates dynamic work items.
Upstream XML File: Reads from input file with the given File Tag.
Custom File Path: Reads from the given XML File path.
Upstream XML Attribute: Reads from an attribute given by the Attribute Name on the upstream Work Item. This can be a File or string attribute.
Custom String: Reads from the given string value.
The file tag of the upstream file.
The filepath of the XML file that should be parsed.
The name of the attribute from which to read XML data.
The XML string to parse.
XPath: Use an XPath expression. XPath is a full-featured query language for XML documents. The expression can return single attribute values, complete elements or lists of results.
By Element Name: Use the given parameters to specify an element name and optionally attribute name to match.
Any Elements: Match any elements in the XML source.
Child Elements: Match only child elements of the active element. (Not the active element itself)
The XPath expression to be evaluated. Note that the 'active element' is the root element of the upstream XML data.
The name of the XML element to be matched.
Element: Extract the complete matched element, which is everything between the start and end tags.
Element Text: Extract the text value of the element. For example Test, the string 'Test' would be extracted.
Attribute: Extract the value of the supplied Attribute Name.
The name of the attribute to extract. The value can be converted from the read string using Match Storage Type.
Add Warning: Adds a warning to the node but does not fail.
Raise Error: Issues a fatal error which stops the cook.
Generate Item: Creates an empty item representing the failed match.
Create Work Item
For Each Match: One Work Item is created for each match result.
For All Matches: One Work Item is created for all results. This may result in array attributes to hold the result values.
Match Storage Type
Element: The query result must be an Element, and it will be written out as either an XML string attribute or an XML file.
String: The query result(s) will be converted to a string attribute.
Integer: The query result(s) will be converted to an integer attribute.
Float: The query result(s) will be converted to a float attribute.
File: The query result(s) will be converted to a file path.
Store Element Match
When the Match Storage Type is Element, how to save it.
As String Attribute: Save the Element as an XML fragment in a string attribute.
Write To File: Write the XML element(s) to a file.
The name of the attribute that gets created to hold the extracted data.
The path to a file to be created when Write To File is active.
When Create Work Item is set to For All Matches and Store Element Match is set to Write To File, the matching Element(s) will be children of this Root.