Converts a lowlevel representation of a XML document to a highlevel representation.
xmldoc2term/3 converts the lowlevel representation of a XML document in a highlevel format. This conversion maps attributes and subelements to term arguments and converts basic elements (attribute values and character data) to MINERVA terms, as defined by the DocType description.
DocType type description of a XML document XmlTerm term representing an XML term Term high level representation of the XML term
xmldoc2term(
n1(n2(-atom), a2 = number, a1 = integer, n3(a3 = atom)),
document(
[xml([version = '1.0'])],
element(n1, [a1 = '0', a2 = '1.0'], [
element(n2, [], [chardata('hello')]),
element(n3, [a3 = 'z'], [])]),
[]),
Term).
->
Term = n1(n2(hello), 1.0, 0, n3(z))
This predicate is not part of the ISO-Prolog Standard.