Description:
XML low level library based on libxml2.
Is recommeded the usage of
XMLDocument and
XMLNode instead of low-level functions.
Libxml2 is the XML C parser and toolkit developed for the Gnome project (but usable outside of the Gnome platform), it is free software available under the MIT License. XML itself is a metalanguage to design markup languages, i.e. text language where semantic and structure are added to the content using extra "markup" information enclosed between angle brackets. HTML is the most well-known markup language. Though the library is written in C a variety of language bindings make it available in other environments.
Libxml2 is known to be very portable, the library should build and work without serious troubles on a variety of systems (Linux, Unix, Windows, CygWin, MacOS, MacOS X, RISC Os, OS/2, VMS, QNX, MVS, ...)
Libxml2 implements a number of existing standards related to markup languages:
· the XML standard: http://www.w3.org/TR/REC-xml
· Namespaces in XML: http://www.w3.org/TR/REC-xml-names/
· XML Base: http://www.w3.org/TR/xmlbase/
· RFC 2396 : Uniform Resource Identifiers http://www.ietf.org/rfc/rfc2396.txt
· XML Path Language (XPath) 1.0: http://www.w3.org/TR/xpath
· HTML4 parser: http://www.w3.org/TR/html401/
· XML Pointer Language (XPointer) Version 1.0: http://www.w3.org/TR/xptr
· XML Inclusions (XInclude) Version 1.0: http://www.w3.org/TR/xinclude/
· ISO-8859-x encodings, as well as rfc2044 [UTF-8] and rfc2781 [UTF-16] Unicode encodings, and more if using iconv support
· part of SGML Open Technical Resolution TR9401:1997
· XML Catalogs Working Draft 06 August 2001: http://www.oasis-open.org/committees/entity/spec-2001-08-06.html
· Canonical XML Version 1.0: http://www.w3.org/TR/xml-c14n and the Exclusive XML Canonicalization CR draft http://www.w3.org/TR/xml-exc-c14n
· Relax NG, ISO/IEC 19757-2:2003, http://www.oasis-open.org/committees/relax-ng/spec-20011203.html
· W3C XML Schemas Part 2: Datatypes REC 02 May 2001
· W3C xml:id Working Draft 7 April 2004
In most cases libxml2 tries to implement the specifications in a relatively strictly compliant way. As of release 2.4.16, libxml2 passed all 1800+ tests from the OASIS XML Tests Suite.
Methods
Create a parser context for an HTML in-memory document
Parse an XML in-memory document and build a tree
Parse an XML file from the filesystem or the network
Parse an XML in-memory document and build a tree
Applies the options to the parser context
Dump an HTML document in memory
Describes the htmlElemDesc into an array
Checks whether an HTML element may be a direct child of a parent element
Checks whether an HTML element may be a direct child of a parent element, and if so whether it is valid or deprecated
Describes the htmlEntityDesc into an array
Free all the memory used by a parser context
Encoding definition lookup in the Meta tags
Set and return the previous value for handling HTML omitted tags
The HTML DTD allows a tag to implicitly close other tags
Determine if a given attribute is a boolean attribute
Check if an attribute is of content type Script
Creates a new HTML document
Creates a new HTML document without a DTD node if URI and ExternalID are empty strings
Checks whether the tree node is valid
Parse Reference declarations
Parse an HTML in-memory document and build a tree
Parse an HTML document (and build a tree if using the standard SAX interface)
Parse an HTML element, this is highly recursive
Parse an HTML file and build a tree
Parse an XML in-memory document and build a tree
Parse an XML file from the filesystem or the network
Parse an XML in-memory document and build a tree
Dump an HTML document to a file
Dump an HTML document to a file using a given encoding
Dump an HTML document to a file using a given encoding and formatting returns/spaces are added
Sets the current encoding in the Meta tags
Add a new node to parent, at the end of the child (or property) list merging adjacent TEXT nodes (in which case cur is freed)
Add a list of node at the end of the child list of the parent merging adjacent TEXT nodes
Add a new node elem as the next sibling of cur
Add a new node elem as the previous sibling of cur merging adjacent TEXT nodes (elem may be freed)
Add a new element elem to the list of siblings of cur merging adjacent TEXT nodes (elem may be freed)
Cleanup function for the XML library
Dump an XML document in memory and return the buffer
Get the root element of the document (doc->children is a list containing possibly comments, PIs, etc
Set the root element of the document (doc->children is a list containing possibly comments, PIs, etc)
Do a global encoding of a string, replacing the predefined entities and non ASCII values with their entities and CharRef counterparts
Free up all the structures used by a document, tree included
Deallocate all the resources associated to the reader
Retrieve the XML node information into an array
Build a structure based Path for the given node
Search all the namespace applying to a given element
Search and get the value of an attribute associated to a node
Search and get the value of an attribute associated to a node
Search for an attribute associated to a node
Search an attribute associated to a node
Checks whether this node is an empty or whitespace only (and possibly ignorable) text-node
Dump in-extenso the memory blocks allocated to the file
Creation of a new child element, added at the end of parent children list
Creation of a new node containing a comment
Creates a new XML document
Creation of a new node containing a comment within a document
Creation of a new node element within a document
Creation of a processing instruction element
Creation of a new node element within a document
Creation of a new text node within a document
Creation of a new node element
Creation of a new Namespace
Create a new property tagged with a namespace and carried by a node
Creation of a processing instruction element
Create a new property carried by a node
Creation of a new reference node
Creation of a new text node
Creation of a new child element, added at the end of parent children list
Append the extra substring to the node content
Searches for the BASE URL
Read the value of a node, this can be either the text carried directly by this node if it's a TEXT node or the aggregate string of the values carried by this node child's (TEXT and ENTITY_REF)
Searches the language of a node
Is this node a Text node?
Set (or reset) the base URI of a node
Replace the content of a node
Set the language of a node
Set (or reset) the name of a node
Parse an XML file and build a tree
Parse an XML in-memory block and build a tree
Parse an XML in-memory document and build a tree
Parse an XML file from the filesystem or the network
Parse an XML in-memory document and build a tree
Parse an XML file from the filesystem or the network
Create an xmltextReader for an XML in-memory document
Unlink and free one attribute, all the content is freed too Note this doesn't work for namespace definition attributes
Dump an XML document to a file
Search a Ns registered under a given name space for a document
Search a Ns aliasing a given URI
Set (or reset) an attribute carried by a node
Set (or reset) an attribute carried by a node
Update all nodes under the tree to point to the right document
The qualified name of the node, equal to Prefix :LocalName
Provides the text value of the node if present
Hacking interface allowing to get the xmlDocPtr correponding to the current document being accessed by the xmlTextReader
The depth of the node in the tree
Whether the node can have a text value
Check if the current node is empty
Retrieve the validity status from the parser context
Get the node type of the current node
This tells the XML Reader to preserve all nodes matched by the pattern
The quotation mark character used to enclose the value of an attribute