Libxml2 Overview

This section describes the libxml2 component which is a wrapper for the standard libxml2 C library.

Purpose

The libxml2 component provides XML processing, parsing and validation APIs. You can call its C functions directly or use the C++ wrapper.

Required background

The libxml2 component is based on the standard libxml2 library.

Architecture

The libxml2 component is the core of the XML collection. Two other components rely on it: the XML Framework and the XML DOM Engine.

Figure: Package diagram for the libxml2 component

The libxml2 sub-component provides direct access to the C API of the standard libxml2 library.

The Utilities sub-component provides object-oriented access to the C functions: it also implements the resource management and error handling capabilities of the Symbian Platform.

If your Symbian Platform build does not include the libxml2 component, the XML DOM Engine and the libxml2 SAX parser plug-in are automatically excluded.

APIs

The following table lists the most relevant C structures of the libxml2 library.

API Description

_xmlDoc

Document. Provides access to the tree of nodes.

_xmlNode

Node. Provides access to its children and chain of attributes.

_xmlAttribute

Attribute.

_xmlElement

Element.

xmlAttributeType::_xmlElementContent

Container for the contents of an element.

_xmlSchema and _xmlDtd

Validation trees. These structures have no C++ wrappers.

_xmlXPathParserContext

XPath evaluation context.

Typical uses

When porting existing software, use the C functions of the standard libxml2 library and refer to the libxml2 Reference Manual for more information.

To take advantage of the standard types and exception handling provided by the Symbian Platform, use the C++ APIs.

Related concepts