Symbian3/SDK/Source/GUID-77ECD89F-84BB-55F1-9876-382E043F0C0D.dita
author Dominic Pinkman <dominic.pinkman@nokia.com>
Tue, 20 Jul 2010 12:00:49 +0100
changeset 13 48780e181b38
parent 0 89d6a7a84779
permissions -rw-r--r--
Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.

<?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-77ECD89F-84BB-55F1-9876-382E043F0C0D" xml:lang="en"><title>XML
Error Handling Reference</title><shortdesc>This section describes how the different components dealing with
XML manage error conditions. </shortdesc><prolog><metadata><keywords/></metadata></prolog><conbody>
<p>In all cases, ensure that your XML is valid and well-formed when using
one of the parsers below. </p>
<p> <b>libxml2 component</b>  </p>
<p>The libxml2 C library has its own error codes and returns <codeph>NULL</codeph> pointers
in Out-Of-Memory conditions. It also stores the last parsing error in a member
of the global <codeph>_xmlGlobalState</codeph> structure. Access this variable
using TLS (Thread-Local Storage). </p>
<p>The methods of the Utilities wrapper leave when they detect an Out-Of-Memory
condition in the libxml2 library. </p>
<p> <b>XML DOM Engine</b>  </p>
<p>When calling a method of the XML DOM Engine, check its return value for
an error code. </p>
<p>Methods that leave do so in Out-Of-Memory conditions. Methods that read
or write files also leave on I/O errors. </p>
<p> <b>XML DOM Engine Serialiser</b>  </p>
<p>The serialiser does not forward all the libxml2 errors and may leave with
the Symbian platform mechanism instead. </p>
<p> <b>XML Framework</b>  </p>
<p>The libxml2 SAX plugin maps the errors received from the libxml2 parser
to parsing events. The leave mechanism only applies when the error is fatal
for the libxml2 parser. </p>
<p>The Expat and WBXML parser plugins use a combination of parsing events
and leaves to handle errors. </p>
</conbody><related-links>
<link href="GUID-33D50AB9-AFA8-521F-8A85-031C24EA7D25.dita"><linktext>libxml2</linktext>
</link>
<link href="GUID-5ACFA8E4-3C4B-5851-A43E-9FA72D0B8403.dita"><linktext>XML DOM Engine</linktext>
</link>
<link href="GUID-F79E4F18-19E2-577E-8409-8B82BD48AC66.dita"><linktext>XML Framework</linktext>
</link>
</related-links></concept>