Top "Elementtree" questions

ElementTree is a Python library for creating and parsing XML.

how to remove attribute of a etree Element?

I've Element of etree having some attributes - how can we delete the attribute of perticular etree Element.

python xml lxml elementtree
Emitting namespace specifications with ElementTree in Python

I am trying to emit an XML file with element-tree that contains an XML declaration and namespaces. Here is my …

python xml elementtree
Get attribute names and values from ElementTree

I have an XML <root> element with several attributes. I've been using the ElementTree package. After I've parsed …

python xml elementtree xmlroot
Converting a Python XML ElementTree to a String

I need to convert an XML ElementTree to a String after altering it. It's the toString part that isn't working. …

python xml elementtree
Check if XML Element has children or not, in ElementTree

I retrieve an XML documents this way: import xml.etree.ElementTree as ET root = ET.parse(urllib2.urlopen(url)) for …

python xml elementtree children
How do I use xml namespaces with find/findall in lxml?

I'm trying to parse content in an OpenOffice ODS spreadsheet. The ods format is essentially just a zipfile with a …

python xml lxml xml-namespaces elementtree
lxml etree xmlparser remove unwanted namespace

I have an xml doc that I am trying to parse using Etree.lxml <Envelope xmlns="http://www.example.…

python lxml xml-parsing elementtree
Can ElementTree be told to preserve the order of attributes?

I've written a fairly simple filter in python using ElementTree to munge the contexts of some xml files. And it …

python xml elementtree
Access nested children in xml file parsed with ElementTree

I am new to xml parsing. This xml file has the following tree: FHRSEstablishment |--> Header | |--> ... |--&…

python xml tree xml-parsing elementtree
Getting a list of XML tags in file, using xml.etree.ElementTree

As mentioned, I need to get the list of XML tags in file, using library xml.etree.ElementTree. I am …

python xml tags elementtree tagname