Explictly mapping the XML elements to SPL attributes

When explicitly converting XML elements to SPL attributes, you must specify an output clause for the operator that contains the specification of XML to SPL attribute mapping. The output clause is similar to a normal output clause, but uses custom output functions to specify the XML entity to SPL attribute mapping on a per-attribute basis. These custom output functions use a subset of XPath expressions.

Procedure

Run the spl-schema-from-xml command to:
  • compute the tuple schema definition for a given representative sample XML document
  • create an output clause using XPath functions that match the tuple declaration
Custom output functions
Supported XPath expressions