XPath support?

kj no.email at please.post
Mon Aug 17 15:05:26 EDT 2009


In <mailman.288.1250455054.2903.python-list at python.org> Kev Dwyer <kevin.p.dwyer at gmail.com> writes:

>On Sun, 16 Aug 2009 20:29:15 +0000, 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 "spam[@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




More information about the Python-list mailing list