Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

XPath support?

0 views
Skip to first unread message

kj

unread,
Aug 16, 2009, 4:29:15 PM8/16/09
to

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

Diez B. Roggisch

unread,
Aug 16, 2009, 4:31:24 PM8/16/09
to
kj schrieb:

Try lxml. It's element-tree compatible, and supports xpath.

Diez

Kev Dwyer

unread,
Aug 16, 2009, 4:37:16 PM8/16/09
to pytho...@python.org


Have you tried lxml (http://codespeak.net/lxml/)?

Kev

kj

unread,
Aug 17, 2009, 3:05:26 PM8/17/09
to

Thanks! (To Diez too!)

kynn

0 new messages