Revision: a9214b6d5e76
Author: Pekka Klärck
Date: Fri Aug 26 04:47:12 2011
Log: Fixed XML parsing with Jython when crimson.jar is in CLASSPATH
Update issue 937
Status: Done
Owner: mikko.korpela
Cc: pekka.klarck
It seems that Crimson is namespace-aware by default and uses startElementNS
and endElementNS instead of startElement and endElement. We tried
configuring
the parser to be non-namespace-aware but failed. Implementing the NS methods
seemed to be the easiest solution.
http://code.google.com/p/robotframework/source/detail?r=a9214b6d5e76
Modified:
/src/robot/result/outputparser.py
=======================================
--- /src/robot/result/outputparser.py Thu Jul 14 15:01:29 2011
+++ /src/robot/result/outputparser.py Fri Aug 26 04:47:12 2011
@@ -48,3 +48,13 @@
def characters(self, content):
self._text.append(content)
+
+ # startElementNS and endElementNS needed when crimson.jar is in
CLASSPATH:
+ # http://code.google.com/p/robotframework/issues/detail?id=937
+
+ def startElementNS(self, name, qname, attrs):
+ attrs = dict((key[1], attrs[key]) for key in attrs.keys())
+ self.startElement(qname, attrs)
+
+ def endElementNS(self, name, qname):
+ self.endElement(qname)