Top "Elementtree" questions

ElementTree is a Python library for creating and parsing XML.

Python - ElementTree- cannot use absolute path on element

I'm getting this error in ElementTree when I try to run the code below: SyntaxError: cannot use absolute path on …

python xpath elementtree
ElementTree iterparse strategy

I have to handle xml documents that are big enough (up to 1GB) and parse them with python. I am …

python xml sax elementtree iterparse
Updating XML elements and attribute values using Python etree

I'm trying to use Python 2.7's ElementTree library to parse an XML file, then replace specific element attributes with test …

python xml elementtree xml.etree
What are the arguments of ElementTree.SubElement used for?

I have looked at the documentation here: http://docs.python.org/dev/library/xml.etree.elementtree.html#xml.etree.ElementTree.…

python xml elementtree
Write xml utf-8 file with utf-8 data with ElementTree

I'm trying to write an xml file with utf-8 encoded data using ElementTree like this: #!/usr/bin/python # -*- …

python elementtree
Get parent element after using find method (xml.etree.ElementTree)

I am working with a huge xml-file and try to extract information from different elements. import xml.etree.ElementTree as …

python xml elementtree
How to find XML Elements via XPath in Python in a namespace-agnostic way?

since I had this annoying issue for the 2nd time, I thought that asking would help. Sometimes I have to …

python xml xpath lxml elementtree
Parse all the xml files in a directory one by one using ElementTree

I'm parsing XML in python by ElementTree import xml.etree.ElementTree as ET tree = ET.parse('try.xml') root = tree.…

python xml parsing elementtree
AttributeError: type object 'ElementTree' has no attribute 'tostring'

I have this problem , AttributeError: type object 'ElementTree' has no attribute 'tostring', I don't know what's is wrong, I import …

xml python-2.7 tostring elementtree
Python 2.7: type object "ElementTree" has no attribute "register_namespace"

with this python 2.7.3 (or 2.7.0) code I want to change the value of the attribute "android:versionCode='2'", which has …

python xml elementtree