views:

2789

answers:

3

Any examples ? thanks

+3  A: 

AFAIK Google App Engine provides a fairly complete Python environment for you to use. Since Python comes with "batteries included" you may want to evaluate the different APIs which vanilla Python offers you: http://docs.python.org/library/markup.html

joschi
+6  A: 

Take a look at existing answers on XML and Python.

Something like this could work:

from cStringIO   import StringIO
from xml.etree   import cElementTree as etree

xml = "<a>aaa<b>bbb</b></a>"

for event, elem in etree.iterparse(StringIO(xml)):
    print elem.text

It prints:

bbb
aaa
J.F. Sebastian
+9  A: 

Since the question was asked, Google has whitelisted pyexpat, which includes minidom, so you can use the following code without having to upload any libraries:

from xml.dom import minidom

dom = minidom.parseString('<eg>example text</eg>')

More information: http://docs.python.org/library/xml.dom.minidom.html

Richard Watson