About 11,000,000 results
Open links in new tab
  1. python - How can I parse XML and get instances of a particular …

    I suggest ElementTree. There are other compatible implementations of the same API, such as lxml, and cElementTree in the Python standard library itself; but, in this context, what they …

  2. Creating a simple XML file using python - Stack Overflow

    Jinja can handle looping over a list of data to produce the inner xml of your document list. That is a bit trickier with raw python string templates For a Jinja example, see my answer to a similar …

  3. Really simple way to deal with XML in Python? - Stack Overflow

    Musing over a recently asked question, I started to wonder if there is a really simple way to deal with XML documents in Python. A pythonic way, if you will. Perhaps I can explain best if i give e...

  4. python - How to write XML declaration using …

    Mar 12, 2013 · I am generating an XML document in Python using an ElementTree, but the tostring function doesn't include an XML declaration when converting to plaintext. from …

  5. python - XML parsing - ElementTree vs SAX and DOM - Stack …

    85 ElementTree is much easier to use, because it represents an XML tree (basically) as a structure of lists, and attributes are represented as dictionaries. ElementTree needs much less …

  6. Python xml ElementTree from a string source? - Stack Overflow

    Mar 15, 2009 · The ElementTree.parse reads from a file, how can I use this if I already have the XML data in a string? Maybe I am missing something here, but there must be a way to use the …

  7. Extracting text from XML using python - Stack Overflow

    For working (navigating, searching, and modifying) with XML or HTML data, I found BeautifulSoup library very useful. For installation problem or detailed information, click on link. To find …

  8. Pretty printing XML in Python - Stack Overflow

    Apr 15, 2009 · What is the best way (or are the various ways) to pretty print XML in Python?

  9. How to fetch all the child nodes of an XML using python?

    Jun 7, 2017 · How to fetch all the child nodes of an XML using python? Asked 8 years, 6 months ago Modified 1 year, 4 months ago Viewed 62k times

  10. How do I get Python's ElementTree to pretty print to an XML file?

    Mar 2, 2015 · I simply solved it with the indent() function: xml.etree.ElementTree.indent(tree, space=" ", level=0) Appends whitespace to the subtree to indent the tree visually. This can be …