That would be because there was a problem in the minidom module shipped 
with Jython 2.1 (which is what STAX uses, not Python).  That is, if you 
ran your test using Jython 2.1 (instead of Python), you would see the same 
error.  If you google for this error, you'll see that the minidom xml 
module provided with Jython 2.1 doesn't work.  Or, if you search the STAF 
forums on SourceForge you'll see this question has already been asked and 
answered (e.g.  http://sourceforge.net/forum/message.php?msg_id=4292971).

See question "2.6.7 How can I parse an XML file from a STAX job?" in the 
STAF/STAX FAQ at http://staf.sourceforge.net/current/STAFFAQ.htm for an 
example of a STAX job that parses an XML file using the XML Parser 
provided with Java.  Note that Jython supports using Java classes, not 
just Python.

--------------------------------------------------------------
Sharon Lucas
IBM Austin,   [EMAIL PROTECTED]
(512) 838-8347 or Tieline 678-8347




"Chi Wang" <[EMAIL PROTECTED]> 
Sent by: [EMAIL PROTECTED]
07/15/2008 04:42 PM

To
<staf-users@lists.sourceforge.net>
cc

Subject
[staf-users] minidom.parse error in stax






I have following code. I ran it from python command line window and it 
works fine. But I got error running it from stax xml file.
 
*********************************************
from xml.dom import minidom
 
xmldoc = minidom.parse('C:/test.xml')
**********************************************
 
I got error like this:
 
Com.ibm.staf.service.STAXPythonEvaluationException:
Trackback(innermost last):
  File ?<pyExec string>?, line 6, in?
  File 
?c:\MyDir\lang\java\shared_jython\2.1-staf-v3\Lib\xml\dom\minidom.py?, 
line 908, in parse
  File 
?c:\MyDir\lang\java\shared_jython\2.1-staf-v3\Lib\xml\dom\minidom.py?, 
line 900, in _doparse
  File 
?c:\MyDir\lang\java\shared_jython\2.1-staf-v3\Lib\xml\dom\pulldom.py?, 
line 251, in getEvent
AttributeError:feed
 
Thanks,
Chi
 
 
 -------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's 
challenge
Build the coolest Linux based applications with Moblin SDK & win great 
prizes
Grand prize is a trip for two to an Open Source event anywhere in the 
world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
staf-users mailing list
staf-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/staf-users

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
staf-users mailing list
staf-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/staf-users

Reply via email to