How to search XML? Are there special libs?

uche.ogbuji at uche.ogbuji at
Fri Mar 17 23:01:42 CET 2006

Ravi Teja wrote:
> Yes! XPath is a good bet.
> You can also try some Pythonic XML libraries like Amara. You need not
> learn any special language even.
> There are good database approaches to XML too, especially if you are
> going to query a document collection as a whole rather than file by
> file. You can try XQuery. I think 4Suite can do this (But I am too
> sleepy to confirm :-) ). You also use eXist (Java but you can use
> XMLRPC or SOAP to interface with it from Python). Not optimal like
> parent said, but if it is XML that have to live with ...

4Suite does not support XQuery.  It does support full XPath plus EXSLT
and enough other extensions to come close to the power of XQuery.
Amara [1] makes it really easy to get XQuery-like power from right
within Python, as I've blogged before (e.g. [2][3]).

I don't know whether full-text indexing of XML is something the OP
needs as well.  If so, see [3].


Uche Ogbuji                               Fourthought, Inc.                   

More information about the Python-list mailing list