Handle XML documents.
NOTE: The simplexml module can also be used to parse XML documents.

Availability

Script Types
All Types

xml()

Get an XML object, which provides XML reader.

Return value

XML Object


XML Reader

Provided by the XML Object, used to read and parse XML data.

xml:create_reader()

Create an XML reader for a given stream.

Parameters

Return value

XML Reader object


reader:next_node()

Get information about the next node in the XML document.

Return value

Returns two values:


reader:next_attr()

Get information about the next attribute in an XML document.

Return value

Returns two values on success nil otherwise:


reader:node_empty()

Determine whether the previous invocation of reader:next_node() refers to an empty node.

Return value

Integer value: -2 on failure, 1 on empty node, 0 on non-empty node