Top "Elementtree" questions

ElementTree is a Python library for creating and parsing XML.

How to correctly parse utf-8 xml with ElementTree?

I need help to understand why parsing my xml file* with xml.etree.ElementTree produces the following errors. *My test …

python xml python-2.7 xml-parsing elementtree
How to find the number of elements in element tree in python?

I am new to element tree,here i am trying to find the number of elements in the element tree. …

python xml lxml elementtree
How do I set attributes for an XML element with Python?

I am using ElementTree to build an XML file. When I try to set an element's attribute with ET.SubElement().__…

python xml python-2.7 elementtree
Error 'failed to load external entity' when using Python lxml

I'm trying to parse an XML document I retrieve from the web, but it crashes after parsing with this error: …

python xml lxml elementtree
Saving XML files using ElementTree

I'm trying to develop simple Python (3.2) code to read XML files, do some corrections and store them back. However, during …

python elementtree
Python: ElementTree, get the namespace string of an Element

This XML file is named example.xml: <?xml version="1.0"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:…

python elementtree
ElementTree and unicode

I have this char in an xml file: <data> <products> <color>fumè</color&…

python unicode encoding utf-8 elementtree
Using Python Iterparse For Large XML Files

I need to write a parser in Python that can process some extremely large files ( > 2 GB ) on a computer …

python xml lxml large-files elementtree
ElementTree findall() returning empty list

I am trying to write a small script for interacting with the last.fm API. I have a small bit …

python xml elementtree last.fm
Remove whitespaces in XML string

How can I remove the whitespaces and line breaks in an XML string in Python 2.6? I tried the following packages: …

python xml xml-serialization python-2.6 elementtree