Usage¶
XPath querying¶
One can query an XML document using XPath 1.0 queries using omni_xml.xpath
function. The function takes an XML document as text
and an XPath query as
text
.
It returns a table with path
(path to the node) and value
(node value).
Element¶
When searching for elements, it will return entire nodes serialized as XML.
Results in:
Text¶
When searching for textual data, one can use text()
in their queries.
Results in:
Namespaces¶
It is possible to query using an explicit namespace identifier.
Results in:
Proper namespace support is lacking
This is not ideal if the identifier used is unknown ahead of time, but sufficient if used for API response handling when it is typically the same.