Problem with text nodes in XML...
2541
3
0
dagush
Member
98 posts
Joined: 9月 2008
Offline
2009年1月5日 13:29
Hi,
Although I've found a different way of doing it, I've found a small problem with the XML parser in Python When I want to read text files, I cannot access the text inside. An example
<test> <text>texttoread</text> </test> and a simple python code
from xml.dom import minidom, Node def testText() openedFile = open('L/dagush/src/XMLShape/test.xml') content = openedFile.read() xmltree = minidom.parseString(content) print "going to print!" print xmltree.getElementsByTagName('text')[0].firstChild.data As I said, I decided not to use text nodes anymore, but I'm still interested in a solution…
cheers and thanks for everything
dagush.-
————————- * skylineEngine project coordinator * buildingEngine module developer http//ggg.udg.edu/skylineEngine
edward
Member
7720 posts
Joined: 7月 2005
Offline
2009年1月5日 14:41
Since this is a purely Python issue, you might be better served contacting its mailing list and/or googling for “python minidom”.
dagush
Member
98 posts
Joined: 9月 2008
Offline
2009年1月5日 15:01
Ups! Sorry! From your answer I infer houdini uses the “standard” python engine, and does not have a brand new one. -) thanks for the answer, anyway! cheers dagush.-
————————- * skylineEngine project coordinator * buildingEngine module developer http//ggg.udg.edu/skylineEngine
edward
Member
7720 posts
Joined: 7月 2005
Offline
2009年1月5日 15:07
The Houdini-specific parts are everything inside hou.*