XML Module for AOLserver

for AOLserver, by Curtis Galloway
This module adds one new command ns_xml that gives you access to the GNOME XML library, also known as libxml or gnome-xml.

Parsing XML documents

The simplest way to use the module is to parse an XML document:
ns_xml parse ?-persist? string
This returns a document handle that can be used in subsequent calls to ns_xml doc. The document will be freed at the end of the current AOLserver transaction, unless the -persist argument is specified, in which case the document must be explicitly freed with ns_xml doc free.

Documents consist of a tree of nodes, starting from the root of the document; various ns_xml subcommands let you examine the node tree (and eventually will let you modify it).

Documents and nodes are referred to by handles, similar to file handles or ns_set handles.

Document subcommands

There are several subcommands that can be performed with a document handle.

Node subcommands

The following subcommands operate on node handles.

More about libxml

The version of libxml used in this module is 1.8.6. It has only two minor modifications: one in xmlmemory.h make it use Ns_Malloc() for memory allocation, and another in parser.h to add a void *userData2 pointer to the xmlParserCtxt structure to make it feasible to do custom error reporting of parse errors.

Future enhancements



curtisg@arsdigita.com
Last modified: Thu Mar 16 13:50:40 EST 2000