XML description
A brief description of XML library. Variables of either the xml and the xmlitem type (an XML tree item) are used for processing XML documents. An XML tree item can be of two types: a text item and a tag item. There are several types of tag items:
- tag item that contains other items <tag ...>.....</tag>;
- tag item that contains no other items <tag .../>;
- tag item of processing instruction <?tag ...?>.
A tag item may contain attributes.
The sequence of operations for processing an XML document:
- process a document (build an XML tree) with the help of the xml.procfile method or the xml.procstr method;
- add entity definitions, using the xml.addentity method if necessary;
- search for the required items in the XML tree using the following methods: xml.getroot, xmlitem.chtag, xmlitem.findtag, xmlitem.getnext, etc.;
- use the foreach statement in order to process similar elements if necessary;
- gain access to tag attributes with the help of the xmlitem.getattrib method and get a text using the xmlitem.gettext method.
Related links | Source |