4 Topics

Member Avatar for
Member Avatar for abaddon2031

I am trying to learn element tree so that i cna work with xml files a little more indepth. I have researched it and everythign i have read says that my version of python should have ElementTree already installed on it. But every time i try to run my sample …

Member Avatar for snippsat
0
2K
Member Avatar for krystosan

How should I make an entry appended to existing entries instead of overwriting the whole file ? class ReadWriteCustomPathsToDisk(object): """docstring for ReadWriteCustomPathsToDisk""" def __init__(self, modulePath): super(ReadWriteCustomPathsToDisk, self).__init__() self.modulePath = modulePath def _xmlFileLocation(self): xmlFileLocation = os.path.join(os.path.expanduser("~"), "Documents","searchMethod","modules.xml") return xmlFileLocation if os.path.exists(xmlFileLocation): return xmlFileLocation def readXml(self): xmlFile = self._xmlFileLocation() root = etree.parse(xmlFile).getroot() …

0
108
Member Avatar for veelasong

I am having trouble parsing xml files using ElementTree after the python code is turned into .exe using cx_freeze. [CODE] from xml.etree import ElementTree file1 = 'file1' file2 = 'file2' tree1 = ElementTree.parse(file1) tree2 = ElementTree.parse(file2) print 'Done' [/CODE] It works fine with the .py file, but after I made …

Member Avatar for veelasong
0
414
Member Avatar for tcl76

hi, i'm using Element Tree API to generate XML. But I'm getting error when opening the xml output. I tried to generate to a file and it worked. No error when running the Python code. Pls advise me why is not workin when i generate to an xml. fyi i'm …

Member Avatar for tcl76
0
228

The End.