Qore XML Module  1.4.1
XML Parsing Constants

Variables

const Qore::Xml::XPF_ADD_COMMENTS = XPF_ADD_COMMENTS
 decode XML comments More...
 
const Qore::Xml::XPF_NONE = XPF_NONE
 no flags; standard XML parsing without character reference conversion
 
const Qore::Xml::XPF_PRESERVE_ORDER = XPF_PRESERVE_ORDER
 decode XML as data; do not try to preserve element order by re-writing hash keys More...
 
const Qore::Xml::XPF_STRIP_NS_PREFIXES = XPF_STRIP_NS_PREFIXES
 strip namespace prefixes from element names when parsing More...
 

Detailed Description

The constants in this group can be combined with binary or to affect the output of parsed XML

Variable Documentation

◆ XPF_ADD_COMMENTS

const Qore::Xml::XPF_ADD_COMMENTS = XPF_ADD_COMMENTS

decode XML comments

If this option is given, then parse_xml() creates hash elements with '^comment^' keys corresponding to comments found in the XML

◆ XPF_PRESERVE_ORDER

const Qore::Xml::XPF_PRESERVE_ORDER = XPF_PRESERVE_ORDER

decode XML as data; do not try to preserve element order by re-writing hash keys

If this option is given and duplicate, out-of-order XML elements are found in the input string, they are deserialized to Qore hash elements with the same name as the XML element but including a caret '^' and a numeric prefix to maintain the same key order in the Qore hash as in the input XML string.

In this case, if the data structure is reserialized with make_xml(), an XML string corresponding to the original input should be generated.

This option should only be used when it is important to maintain the XML element order in the resulting Qore data structure (for example, when the data must be re-serialized to an XML string and the element order within a subelement must be maintained), for example, when parsing and reserializing an OSX property list in XML format.

◆ XPF_STRIP_NS_PREFIXES

const Qore::Xml::XPF_STRIP_NS_PREFIXES = XPF_STRIP_NS_PREFIXES

strip namespace prefixes from element names when parsing

Since
xml 1.4