diff -r 48780e181b38 -r 578be2adaf3e Symbian3/PDK/Source/GUID-C5C30218-311C-58D9-A990-3F95642F7517.dita --- a/Symbian3/PDK/Source/GUID-C5C30218-311C-58D9-A990-3F95642F7517.dita Tue Jul 20 12:00:49 2010 +0100 +++ b/Symbian3/PDK/Source/GUID-C5C30218-311C-58D9-A990-3F95642F7517.dita Fri Aug 13 16:47:46 2010 +0100 @@ -1,89 +1,89 @@ - - - - - -Parsing -XML DOMThis topic explains how to build a DOM tree by parsing an XML file. -

Before you start, you must:

    -
  • understand the concept -of Document Object Model -(DOM)

  • -
  • understand the architecture -and classes of the XML -DOM Engine component

  • -
  • prepare an XML file -containing valid XML data

  • -
- - -Call the XmlEnginePushL() method to -put parser resources on the clean-up stack. - -XmlEnginePushL(); - - -Initialise your -instance of the RXmlEngDOMImplementation class -by calling its OpenL() method. - -RXMlEngDOMImplementation impl; -impl.OpenL(); - -The RXMlEngDOMImplementation instance is the DOM Engine. - - -Initialise the DOM parser by calling the RXmlEngDOMParser::Open() method -on its instance. - -RXmlEngDOMParser parser; -parser.Open( impl ); - -You can also have several parsers registered on a DOM Engine instance. - - -Parse the specified XML file by calling the RXmlEngDOMParser::ParseFileL() method. - -RXmlDocument myDoc = parser.ParseFileL( "tutorial.xml" ); - -The myDoc object is a DOM tree containing the data -from the XML file. - - -Use the created DOM tree. -For example, refer to the Searching -a DOM Tree using XPath to search for specific elements or attributes -in the DOM tree. - - -Free your resources as necessary. - -Close the parser -and the engine by calling their Close() functions. - -parser.Close(); -impl.Close(); - - - -Close the XML library by calling the XmlPopAndClose() method. -This method also removes the serialisation resources from the clean-up stack. - - -Perform any other clean-up operations. - - - - -
-Searching -a DOM Tree using XPath -Serialising -XML DOM + + + + + +Parsing +XML DOMThis topic explains how to build a DOM tree by parsing an XML file. +

Before you start, you must:

    +
  • understand the concept +of Document Object Model +(DOM)

  • +
  • understand the architecture +and classes of the XML +DOM Engine component

  • +
  • prepare an XML file +containing valid XML data

  • +
+ + +Call the XmlEnginePushL() method to +put parser resources on the clean-up stack. + +XmlEnginePushL(); + + +Initialise your +instance of the RXmlEngDOMImplementation class +by calling its OpenL() method. + +RXMlEngDOMImplementation impl; +impl.OpenL(); + +The RXMlEngDOMImplementation instance is the DOM Engine. + + +Initialise the DOM parser by calling the RXmlEngDOMParser::Open() method +on its instance. + +RXmlEngDOMParser parser; +parser.Open( impl ); + +You can also have several parsers registered on a DOM Engine instance. + + +Parse the specified XML file by calling the RXmlEngDOMParser::ParseFileL() method. + +RXmlDocument myDoc = parser.ParseFileL( "tutorial.xml" ); + +The myDoc object is a DOM tree containing the data +from the XML file. + + +Use the created DOM tree. +For example, refer to the Searching +a DOM Tree using XPath to search for specific elements or attributes +in the DOM tree. + + +Free your resources as necessary. + +Close the parser +and the engine by calling their Close() functions. + +parser.Close(); +impl.Close(); + + + +Close the XML library by calling the XmlPopAndClose() method. +This method also removes the serialisation resources from the clean-up stack. + + +Perform any other clean-up operations. + + + + +
+Searching +a DOM Tree using XPath +Serialising +XML DOM
\ No newline at end of file