Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries. Thanks for all your past and future contributions.
XML parsing in Symbian OS v9.x
What is the recommended way to parse XML files? Which API should we use?
This depends on the type of our xml document and the parsing methodology that we want to use. DOM is best used for applications where the document elements have to be accessed and manipulated in an unpredictable sequence and repeatedly. If the applications involves a sequential or one-time selective read or write per processed document, DOM presents a considerable overhead. The sequential SAX model is advantageous in such a case in terms of speed and memory consumption. Symbian SDK provides API's which will help for both SAX and DOM based parsing.
Is it possible to get proper documentation about Symbian's XML Framework and CParser?
The usage of CParser is discussed in Using the XML parser for Symbian C++.
Does Symbian's XML Framework (CParser) provide a DOM interface? Or only SAX?
Cparser is part of the Symbian XML framework which can be used for SAX model. CsenXmlReader, CSenBaseFragment, CSenDomFragment are part of the XML extensions provided by Symbian. CSenXMLReader internally uses Cparser.
What is the main difference between CParser and the S60 parser (CSenXMLReader)? Does the S60 API support DOM parsing?
CSenXmlReader & CSenBaseFragment can also be used for SAX model. CSenXmlReader & CSenDomFragment can be used for DOM parsing. For more details on how to do the DOM parsing please refer to the S60 3.0 MR SDK or S60 3.0 FP1 SDK which provides some example code. In the S60 FP1 SDK go to API Reference\C++API Reference\S60 Platform services\Web Based Services\ Web Services\Usage\XML Parsing and API Reference\C++API Reference\S60 Platform services\Web Based Services\ Web Services\XML Extensions.