Top "Elementtree" questions

ElementTree is a Python library for creating and parsing XML.

Is there a way to get a line number from an ElementTree Element

So I'm parsing some XML files using Python 3.2.1's cElementTree, and during the parsing I noticed that some of the …

python xml python-3.x elementtree
How to tell lxml.etree.tostring(element) not to write namespaces in python?

I have a huge xml file (1 Gig). I want to move some of the elements (entrys) to another file with …

python namespaces lxml tostring elementtree
How can one replace an element with text in lxml?

It's easy to completely remove a given element from an XML document with lxml's implementation of the ElementTree API, but …

python xml lxml elementtree
Python 3 parse xml file with ElementTree

Help, I have the following XML file that I am trying to read and extract data from, below is an …

python python-3.x xml-parsing elementtree xml.etree
"XML or text declaration not at start of entity: line 2, column 0" when calling ElementTree.parse

ElementTree.parse() fails in the simple example below with the error xml.etree.ElementTree.ParseError: XML or text declaration not …

python xml elementtree
Parse XML with (X)HTML entities

Trying to parse XML, with ElementTree, that contains undefined entity (i.e.  ) raises: ParseError: undefined entity   …

python xml python-3.x elementtree
lxml convert element to elementtree

The following test reads a file, and using lxml.html generates the leaf nodes of the DOM/Graph for the …

python element lxml elementtree
ElementTree Returns Element Instead of ElementTree

I am trying to build an ElementTree from a string. When I do the following (as set out in Python …

python xml python-3.x elementtree
Python: Ignore xmlns in elementtree.ElementTree

Is there a way to ignore the XML namespace in tage names in elementtree.ElementTree? I try to print all …

python xml xml-namespaces elementtree
How to extract the first hit elements from an XML NCBI BLAST file?

Im trying to extract only the first hit from an NCBI xml BLAST file. next I would like to get …

python xml bioinformatics elementtree ncbi