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.

Archived:How to use XML in PySymbian

From Wiki
Jump to: navigation, search

Archived.pngAquivado: Este artigo foi arquivado, pois o conteúdo não é mais considerado relevante para se criar soluções comerciais atuais. Se você achar que este artigo ainda é importante, inclua o template {{ForArchiveReview|escreva a sua justificativa}}.

All PySymbian articles have been archived. PySymbian is no longer maintained by Nokia and is not guaranteed to work on more recent Symbian devices. It is not possible to submit apps to Nokia Store.

Article Metadata
Created: cyke64 (02 Apr 2007)
Last edited: hamishwillee (31 May 2013)

There are many xml libraries in python world but on S60 there are few implementations of them.


Expat is an XML parser library written in C. It is a stream-oriented parser in which an application registers handlers for things the parser might find in the XML document (like start tags). Pyexpat is part of PyXML and is a wrapper of the expat parser. It supports DTD validation.

For parsing xml with python you need pyexpat for S60.

pyexpat has been ported to python S60.

XML Parser implementation based on REX

Robert Cameron has a set of regular expressions that can be used - very easily and effectively - to parse XML content.

The XmlParser module can be used to parse an XML file or to parse an XML string.


The cElementTree module is a C implementation of the ElementTree API, optimized for fast parsing and low memory use. On typical documents, cElementTree is 15-20 times faster than the Python version of ElementTree, and uses 2-5 times less memory. On modern hardware, that means that documents in the 50-100 megabyte range can be manipulated in memory, and that documents in the 0-1 megabyte range load in zero time (0.0 seconds). This allows you to drastically simplify many kinds of XML applications. cElementTree has been adapted to Python S60 by Simo Salminen.

links : Python and XML

This page was last modified on 31 May 2013, at 01:05.
29 page views in the last 30 days.