Generating XML
In general, when building XML messages in the Translator you want to start off with a template XML string. Using an XML template to start building an XML is the easiest and fastest method. It’s useful for building complex consistent XML structures as there are often consistent values which can be hardcoded.
Parsing an XML Template
Mapping XML
Functions from the XML API and the XML Library to create elements, attributes, and set values. If you are following along in your Iguana, import the XML Library.
Serializing XML
Once the XML message has been generated and mapped, it can be serialized to convert the XML node tree to a Lua string before sending downstream (e.g. to a component queue, in REST or SOAP web request, etc.).
For a more complex example of generating and mapping large XML documents, see the CDA Creator.
Â