Symbian3/SDK/Source/GUID-33D50AB9-AFA8-521F-8A85-031C24EA7D25.dita
author Dominic Pinkman <Dominic.Pinkman@Nokia.com>
Wed, 31 Mar 2010 11:11:55 +0100
changeset 7 51a74ef9ed63
child 8 ae94777fff8f
permissions -rw-r--r--
Week 12 contribution of API Specs and fix SDK submission

<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
<!-- This component and the accompanying materials are made available under the terms of the License 
"Eclipse Public License v1.0" which accompanies this distribution, 
and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
<!-- Initial Contributors:
    Nokia Corporation - initial contribution.
Contributors: 
-->
<!DOCTYPE concept
  PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
<concept id="GUID-33D50AB9-AFA8-521F-8A85-031C24EA7D25" xml:lang="en"><title>Libxml2
Overview</title><prolog><metadata><keywords/></metadata></prolog><conbody>
<p>This section describes the libxml2 component which is a wrapper for the
standard libxml2 C library. </p>
<section id="GUID-F78E0EE2-A612-4AB4-9EBF-09B220780574"><title>Purpose</title> <p>The libxml2 component provides XML processing,
parsing and validation APIs. You can call its C functions directly or use
the C++ wrapper. </p> </section>
<section id="GUID-B4508A67-D97E-4EEA-801A-0AB808B695C8"><title>Required background</title> <p>The libxml2 component is based
on the standard <xref href="http://xmlsoft.org/" scope="external">libxml2</xref> library. </p> </section>
<section id="GUID-4B29685C-200B-42F0-8DD1-C93242843C63"><title>Architecture</title> <p>The libxml2 component is the core
of the XML collection. Two other components rely on it: the <xref href="GUID-F79E4F18-19E2-577E-8409-8B82BD48AC66.dita">XML
Framework</xref> and the <xref href="GUID-5ACFA8E4-3C4B-5851-A43E-9FA72D0B8403.dita">XML
DOM Engine</xref>. </p> <fig id="GUID-4EE5466D-6370-5ED5-9BAA-838F5413AAE5">
<title>              Package diagram for the libxml2 component            </title>
<image href="GUID-873186CE-9723-558F-9C7E-0CEE607F076C_d0e429410_href.png" placement="inline"/>
</fig> <p>The libxml2 sub-component provides direct access to the C API of
the standard libxml2 library. </p> <p>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. </p> <p>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. </p> </section>

<section id="GUID-BB2FC62C-E8AB-42CF-BFC1-FC7CA5EDB9DC"><title>APIs</title> <p>The <xref href="GUID-321A32BB-75B1-38B4-A8F5-BF69D1F041FD.dita"><apiname>XMLEngPushL()</apiname></xref> function
opens and initializes the libxml2 library parser. The <xref href="GUID-64E53D09-2F54-3188-A1D4-F541BDC40240.dita"><apiname>XMLEngPopAndClose()</apiname></xref> function
closes the library parser and frees its resources. You must call the <xref href="GUID-321A32BB-75B1-38B4-A8F5-BF69D1F041FD.dita"><apiname>XMLEngPushL()</apiname></xref> function
before any parsing and serialisation operations, and call the <xref href="GUID-64E53D09-2F54-3188-A1D4-F541BDC40240.dita"><apiname>XMLEngPopAndClose()</apiname></xref> function
when these operations are completed. </p> <p>The following table lists the
most relevant wrapper classes of the libxml2 library. High-level classes are
in the <xref href="GUID-5ACFA8E4-3C4B-5851-A43E-9FA72D0B8403.dita">XML DOM Engine</xref> component. </p> <table id="GUID-9A8FA78F-CF35-5897-AD8E-B35B7CFF63D9">
<tgroup cols="2"><colspec colname="col0"/><colspec colname="col1"/>
<thead>
<row>
<entry>API</entry>
<entry>Description</entry>
</row>
</thead>
<tbody>
<row>
<entry><p> <xref href="GUID-1DA29392-2F71-36CA-865F-B6616E1506F8.dita"><apiname>xmlGlobalState</apiname></xref>  </p> </entry>
<entry><p>Global data providing access to most of the libxml2 library: settings,
function pointers, and so on. Available through TLS </p> </entry>
</row>
<row>
<entry><p> <xref href="GUID-2B22200A-55E0-3428-94FE-332224003D68.dita"><apiname>TXmlEngString</apiname></xref>  </p> </entry>
<entry><p>General-purpose string: pointer-sized object containing a zero-terminated
UTF-8 string. </p> </entry>
</row>
<row>
<entry><p> <xref href="GUID-E0D0625F-C100-3B83-A385-D3702D5AD434.dita"><apiname>TXmlEngConstString</apiname></xref>  </p> </entry>
<entry><p>Read-only version of <codeph>TXmlEngString</codeph>. </p> </entry>
</row>
</tbody>
</tgroup>
</table> <p>The following table lists the most relevant C structures of the
libxml2 library. </p> <table id="GUID-3AE5C214-E832-5331-9243-534265A5DF9F">
<tgroup cols="2"><colspec colname="col0"/><colspec colname="col1"/>
<thead>
<row>
<entry>API</entry>
<entry>Description</entry>
</row>
</thead>
<tbody>
<row>
<entry><p> <xref href="GUID-5257133A-35CC-3D8D-B56C-E865B45A95D2.dita"><apiname>_xmlDoc</apiname></xref>  </p> </entry>
<entry><p>Document. Provides access to the tree of nodes. </p> </entry>
</row>
<row>
<entry><p> <xref href="GUID-870927E4-4D27-3A49-9672-8C336D8817C3.dita"><apiname>_xmlNode</apiname></xref>  </p> </entry>
<entry><p>Node. Provides access to its children and chain of attributes. </p> </entry>
</row>
<row>
<entry><p> <xref href="GUID-204C12B5-8D50-3BBB-8CFC-20036F3AB787.dita"><apiname>_xmlAttribute</apiname></xref>  </p> </entry>
<entry><p>Attribute. </p> </entry>
</row>
<row>
<entry><p> <xref href="GUID-354C802A-33D5-3E3B-9FAE-C0CD8CE6329C.dita"><apiname>_xmlElement</apiname></xref>  </p> </entry>
<entry><p>Element. </p> </entry>
</row>
<row>
<entry><p> <xref href="GUID-3A2A7AE7-C1FF-3534-9319-400D3B57EC85.dita#GUID-3A2A7AE7-C1FF-3534-9319-400D3B57EC85/GUID-59610388-E6CA-3A12-8403-63D12A2D741B"><apiname>xmlAttributeType::_xmlElementContent</apiname></xref>  </p> </entry>
<entry><p>Container for the contents of an element. </p> </entry>
</row>
<row>
<entry><p> <xref href="GUID-5CF7019B-3D9B-369E-B81C-72D2D2DD1375.dita"><apiname>_xmlSchema</apiname></xref> and <xref href="GUID-2AA3571C-0A78-3C42-8FA2-219E642C2218.dita"><apiname>_xmlDtd</apiname></xref>  </p> </entry>
<entry><p>Validation trees. These structures have no C++ wrappers. </p> </entry>
</row>
<row>
<entry><p> <xref href="GUID-50CFFAE0-5B6D-342D-B372-642055EF7367.dita"><apiname>_xmlXPathParserContext</apiname></xref>  </p> </entry>
<entry><p>XPath evaluation context. </p> </entry>
</row>
</tbody>
</tgroup>
</table> </section>
<section id="GUID-C302F9A6-7E2C-4CC3-991D-F653C4877C56"><title>Typical uses</title> <p>When porting existing software, use
the C functions of the standard libxml2 library and refer to the <xref href="http://xmlsoft.org/html/index.html" scope="external">libxml2 Reference Manual</xref> for more information. </p> <p>To
take advantage of the standard types and exception handling provided by the
Symbian Platform, use the C++ APIs. </p> </section>
</conbody><related-links>
<link href="GUID-77ECD89F-84BB-55F1-9876-382E043F0C0D.dita"><linktext>XML DOM Engine
error handling</linktext></link>
</related-links></concept>