From: SourceForge.net <no...@so...> - 2007-07-20 10:47:00
|
Bugs item #1757419, was opened at 2007-07-20 13:03 Message generated for change (Comment added) made by laukpe You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=112867&aid=1757419&group_id=12867 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: targeted for 2.2rc2 Status: Open Resolution: None Priority: 5 Private: No Submitted By: pillesoft (pillesoft) Assigned to: Nobody/Anonymous (nobody) Summary: xml handling in jython and in python works different Initial Comment: Dear All, i have a strange problem, which i don't understand. i need to parse an xml string, which works different in python 2.4.2 and in jython 2.2rc2 please check the attached files, and run the py code in python and in jython2.2rc2 you will see that in jython there are nodes where more textnodes exist, while in python every node has only one textnode. if there is a problem in the code, please give me some help? thank you Ivan ---------------------------------------------------------------------- Comment By: Pekka Laukkanen (laukpe) Date: 2007-07-20 13:46 Message: Logged In: YES user_id=1379331 Originator: NO Could you please create the simplest possible example where something goes wrong? The xml file you attached is huge -- I'm sure you can create a simpler one showing the same problem. Your Python code is ok otherwise but it contains hard coded path (d:\temp\pms_act.xml) so it won't run without editing. Probably the best would be if you created just one .py file where you had the xml as string. Then you could simply attach that file (instead of a zip) to the bug report so that it would be easier to view and download the code. Your example could look something like below. from xml.dom import minidom from StringIO import StringIO myxml = """<hello> world </hello>""" mydom = minidom.parse(StringIO(myxml)) # do something demonstrating the problem here ... If you make the example simple it is more likely that someone will actually take a look at it. I'm doing all my little Jython contributions totally on my own time. I know something about xml and could investigate this out of my own interest but I'm not planning to spent time on getting the example running first. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=112867&aid=1757419&group_id=12867 |