elementtree
argument of type 'NoneType' is not iterable
I am trying to open a directory that contains a series of XML\'s in one specific directory. In the following code, I am iterating through each XML document, and I\'m setting some \"if statements\" to[详细]
2023-03-22 06:43 分类:问答Can't dump or write an ElementTree element
I\'m having a problem outputting even the simplest Element(Tree) instances. If I try the following code in Python 2.7.1[详细]
2023-03-16 22:20 分类:问答Confused by which XML processing option to use
I\'m fairly new to Python, and I\'ve just started working with XML parsing.I am getting a bit overwhelmed by all the options for working with XML, and I\'m hoping an experienced person can give me som[详细]
2023-03-14 22:03 分类:问答etree get attribute as a value instead of a string
For a given Element, I want to check whether the xsi:nil attribute is set to true. My current code is xsinil = dataFact.get(\'{开发者_如何学编程http://www.w3.org/2001/XMLSchema-instance}nil\', False[详细]
2023-03-14 03:42 分类:问答TypeError:'int' object is not iterable when I try to iterate through my inner loop?
I am not sure what the problem is with my loop structure. Maybe it\'s a naming problem since the count variable and SubElement names use the same variable. Any help is appreciated.[详细]
2023-03-13 10:27 分类:问答Python development - elementtree XML and string operations
I am using ElementTree to load up a series of XML files and parse them. As a file is parsed, I am grabbing a few bits of data from it ( a headline and a paragraph of text).I then need to grab some fil[详细]
2023-03-09 13:37 分类:问答Module import works on interpreter but not on a script
i was beggining to follow a tutorial on elementtree in this site http://www.bigfatalien.com/?p=223 so as usual i typed the reference scripts on the interpreter and i went[详细]
2023-03-09 02:26 分类:问答Python/ElementTree: Write to file without namespaces
I\'m trying to write an ElementTree object to disk. Everything works, except that the output file looks like this:[详细]
2023-03-07 10:07 分类:问答Python ElementTree: Error Trying to implement a pretty-print
I have some python xml code using ElementTree that writes a very ugly xml file.I wanted to make the xml file a bit more readable.But ElementTree has no pretty-print function.In the documentation Eleme[详细]
2023-03-06 12:00 分类:问答search/replace content of xml
I\'ve been successful using xml.etree.ElementTree to parse an xml, search for content, then write this to a diffe开发者_如何学JAVArent xml. However, I just worked with text, inside of a singe tag.[详细]
2023-03-06 04:55 分类:问答