SYNOPSIS
DESCRIPTION
table.fromXML() parses XML data and converts it into a table.
The implementation handles only start element, end element, character data and attributes. Comments are discarded.
The resulting table has one nested table entry for each element.
Any character data of an element is put into the table's value field.
If an element has attributes, then the element's table contains a attrs field with a map
of key/value pairs. The order of attributes is not saved. The attrs field does not exist if
the element has no attributes.
The optional map table can be used to remap element names. If the map contains an entry for an element name, then that element name is replaced with the value found in the map.
The typical XML header <?xml version="1.0" encoding="UTF-8"?> is optional. The parser has only been tested with UTF-8 data.
RETURN VALUE
On success, returns a single table value.
On failure, returns five values: nil, a string describing the error, the line number of the error, the column number of the error and the index into the string of the error. All indexes are 1 based.