[XML-SIG] xpath error

Ajay abra9823 at mail.usyd.edu.au
Wed Sep 8 03:11:09 CEST 2004


Quoting Uche Ogbuji <uche.ogbuji at fourthought.com>:

> On Mon, 2004-08-30 at 19:19, Ajay wrote:
> > hi!
> >
> > i parsed an XML document using minidom and then executed the following
> > statement:
> > dataNodes = xpath.Evaluate(".//*[local-name()='DATA']",
> > document.documentElement)
> >
> > this gives an error
> >
> > Traceback (most recent call last):
> >   File "<stdin>", line 1, in ?
> >   File "C:\PYTHON23\Lib\site-packages\_xmlplus\xpath\__init__.py",
> line 70,
> > in E
> > valuate
> >     retval = parser.new().parse(expr).evaluate(con)
> >   File
> >
> "C:\PYTHON23\Lib\site-packages\_xmlplus\xpath\ParsedAbbreviatedRelativeLo
> > cationPath.py", line 52, in evaluate
> >     res = Set.Union(res,subRt)
> >   File "C:\PYTHON23\Lib\site-packages\_xmlplus\xpath\Set.py", line 25,
> in
> > Union
> >     return compare + filter(lambda x,compare = compare:x not in
> > compare,loop)
> > TypeError: can only concatenate list (not "tuple") to list
>
> This is a bug that was reported a month ago or so.  The main problem is
> that the XPath implementation in PyXML has fallen a long ways behind the
> code in 4Suite, and no one has the spare cycles for a re-merge.
>

but i am using _xmlplus.dom.minidom and xpath from the same package.
surely they should work?
apart from doing a traversal myself, is there a way around it?

thanks
cheers




>
> --
> Uche Ogbuji                                    Fourthought, Inc.
> http://uche.ogbuji.net    http://4Suite.org    http://fourthought.com
> Meet me at XMLOpen Sept 21-23 2004, Cambridge, UK.  http://xmlopen.org
>
> A hands-on introduction to ISO Schematron -
> http://www-106.ibm.com/developerworks/edu/x-dw-xschematron-i.html
> Practical (Python) SAX Notes -
> http://www.xml.com/pub/a/2004/08/11/py-xml.html
> XML circles the globe - http://www.javareport.com/article.asp?id=9797
> Element structures for names and addresses -
> http://www.ibm.com/developerworks/xml/library/x-elemdes.html
> Commentary on "Objects. Encapsulation. XML?" -
> http://www.adtmag.com/article.asp?id=9090
> Harold's Effective XML -
> http://www.ibm.com/developerworks/xml/library/x-think25.html
> A survey of XML standards -
> http://www-106.ibm.com/developerworks/xml/library/x-stand4/
>
>


----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.


More information about the XML-SIG mailing list