Re: XPath support?
In mailman.288.1250455054.2903.python-l...@python.org Kev Dwyer kevin.p.dw...@gmail.com writes: On Sun, 16 Aug 2009 20:29:15 +, kj wrote: I'm looking for a XML parser that produces an object with full XPath support. What I've been using up to now, xml.etree.ElementTree, fails to support Xpath predicates, as in sp...@eggs='3']/ham. What I'm trying to do is to read-in a large XML string, and parse it into an object from which I can extract nodes matching selectors that include such predicates. Any suggestions would be greatly appreciated. TIA! kynn Have you tried lxml (http://codespeak.net/lxml/)? Thanks! (To Diez too!) kynn -- http://mail.python.org/mailman/listinfo/python-list
Re: XPath support?
kj schrieb: I'm looking for a XML parser that produces an object with full XPath support. What I've been using up to now, xml.etree.ElementTree, fails to support Xpath predicates, as in sp...@eggs='3']/ham. What I'm trying to do is to read-in a large XML string, and parse it into an object from which I can extract nodes matching selectors that include such predicates. Any suggestions would be greatly appreciated. Try lxml. It's element-tree compatible, and supports xpath. Diez -- http://mail.python.org/mailman/listinfo/python-list
Re: XPath support?
On Sun, 16 Aug 2009 20:29:15 +, kj wrote: I'm looking for a XML parser that produces an object with full XPath support. What I've been using up to now, xml.etree.ElementTree, fails to support Xpath predicates, as in sp...@eggs='3']/ham. What I'm trying to do is to read-in a large XML string, and parse it into an object from which I can extract nodes matching selectors that include such predicates. Any suggestions would be greatly appreciated. TIA! kynn Have you tried lxml (http://codespeak.net/lxml/)? Kev -- http://mail.python.org/mailman/listinfo/python-list
Re: xpath support in python 2.4
And80 wrote: I would like to use xpath modules in python2.4 In my local machine I am running python2.3.5 and on the server I run python2.4. I have seen that while on my computer i am able to import xml.xpath, on the server the module seems to not exist. Is it still part of the standard library? if not, what should I use? sounds like you've installed http://pyxml.sourceforge.net/ on one of your machines, but not on the other. (afaik, xml.xpath has never been part of the standard library.) /F -- http://mail.python.org/mailman/listinfo/python-list
Re: xpath support in python 2.4
And80 wrote: Hi, I would like to use xpath modules in python2.4 In my local machine I am running python2.3.5 and on the server I run python2.4. I have seen that while on my computer i am able to import xml.xpath, on the server the module seems to not exist. Is it still part of the standard library? if not, what should I use? Thank you in advance, Andrea Fiore a couple disconnected observations: - for install questions, you need to specify O/S, how you installed python, maybe something about RAM/CPU if performance constraints - check the blogalog about Xpath earlier this year: http://www.oreillynet.com/pub/wlg/6239 http://www.nelson.monkey.org/~nelson/weblog/tech/python/xpath.html -- http://mail.python.org/mailman/listinfo/python-list
Re: xpath support in python 2.4
[And80] I would like to use xpath modules in python2.4 In my local machine I am running python2.3.5 and on the server I run python2.4. I have seen that while on my computer i am able to import xml.xpath, on the server the module seems to not exist. Is it still part of the standard library? No, it's not. Not sure if it ever was. if not, what should I use? Install PyXML http://pyxml.sourceforge.net HTH, -- alan kennedy -- email alan: http://xhaus.com/contact/alan -- http://mail.python.org/mailman/listinfo/python-list
Re: xpath support in python 2.4
And80: Is [the xml.xpath module] still part of the standard library? Alan Kennedy: No, it's not. Not sure if it ever was. It never was. -- Uche Ogbuji Fourthought, Inc. http://uche.ogbuji.nethttp://fourthought.com http://copia.ogbuji.net http://4Suite.org Articles: http://uche.ogbuji.net/tech/publications/ -- http://mail.python.org/mailman/listinfo/python-list
Re: xpath support in python 2.4
Fredrik Lundh wrote: sounds like you've installed http://pyxml.sourceforge.net/ on one of your machines, but not on the other. or ActiveState Python on one and python.org Python on the other??? Just a guess. No STFWing was done before posting this message. ;-) -- http://mail.python.org/mailman/listinfo/python-list