About 130,000 results
Open links in new tab
  1. 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 …

  2. Parsing XML with namespace in Python via 'ElementTree'

    Also see the Parsing XML with Namespaces section of the ElementTree documentation. As of Python 3.8, the ElementTree library also understands the {*} namespace wildcard, so …

  3. 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 …

  4. xml - Accessing XMLNS attribute with Python Elementree? - Stack …

    I can't answer your question - but having struggled against this shortcoming for a couple of days I'm prepared to claim that it isn't possible using with the current ElementTree API. In my …

  5. Parsing XML in Python using ElementTree example

    Nov 24, 2009 · I'm having a hard time finding a good, basic example of how to parse XML in python using Element Tree. From what I can find, this appears to be the easiest library to use …

  6. python - How to output CDATA using ElementTree - Stack Overflow

    Oct 6, 2008 · This still doesn't help if you want to parse an XML with CDATA sections and then output it again with the CDATA sections, but it at least allows you to create XMLs with CDATA …

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

    The available options for that are: ElementTree (Basic, pure-Python implementation of ElementTree. Part of the standard library since 2.5) cElementTree (Optimized C …

  8. xml parsing - Python element tree - extract text from element ...

    Learn how to extract text from an element in Python using ElementTree while removing tags.

  9. python - Parsing an XML file using Element Tree - Stack Overflow

    I have a large number of .xml files (about 70) and i need to extract some co-ordinates from them. Apparently the best way to do this is to parse the xml file using element tree. I am new to …

  10. python - How to parse XML with xml.Etree.ElementTree? - Stack …

    Jun 6, 2022 · I am trying to parse a XML with xml.etree.Elementree, but I am not able to extract the information "ArticleTitle" and "DescriptorName" into a variable respectively into a list of …