XML node extract operators

The XML node extract operator is a data flow operator that you can use to extract one or more nodes from an XML column.
XML node extract operator concept graphic
You can use the XML node extract operator in a data flow to perform the following functions:
  • Extract nodes from an XML column.
  • Save the extracted nodes in an XML column.
  • Save the data that remains after the operator extracts nodes from an XML column.
The operator has one input port and two or more output ports. The output ports are named extract and rest.
Extract port
The operator can contain more than one extract port that contains data from nodes that are extracted for that specific port. You can define nodes that you want to extract in each extract port. Each extract port can display a different set of nodes.
Rest port
The operator contains only one rest port that contains the data that remains after the operator extracts nodes from an XML column. You can specify whether to retain the XML tag information of the extracted node in the XML column that is available in the rest port.

For example, a table named Employee contains an XML column named info. That column contains XML data in this format:
<customerinfo xmlns="http://sample.org">
<name>Mary Smith</name>
<address country="Canada">
<city>Toronto</city>
</address>
<phone type="work">416-555-5858</phone>
</customerinfo>

You decide to extract the name node to the one extract port of the operator and keep the empty XML tag of the name node in the remaining XML data that is available at rest port. You also decide to extract the data of the city node to another extract port of the operator and keep the XML tag of the city node in the remaining XML data that is available at rest port.

The operator produces the following three XML columns on the output ports.
extract port
<name>Mary Smith</name>
extract1 port
<city>Toronto</city>
rest port
<customerinfo xmlns="http://sample.org">
<name/>
<address country="Canada">
<city/>
</address>
<phone type="work">416-555-5858</phone>
</customerinfo>


Feedback | Information roadmap