looking for a simple XML api for python
Van Gale
news at exultants.org
Thu May 22 17:33:21 EDT 2003
> "Istvan Albert" <ialbert at mailblocks.com> wrote in message
> news:Tr9za.228673$pa5.224690 at rwcrnsc52.ops.asp.att.net...
>
>>And I don't mean just parsing either, I saw the
>>pyRXP does that pretty well, only that it
>>does not offer a modifiable document model.
I assume you are talking about PyRXP returning a tuple, which is
immutable. If so, all you need to do is "ReturnList=1" to have it
return a mutable list instead.
I don't know of any XPath module that works with PyRXP though.
>>I'm looking for a simple, lightweigth API developed for python,
>>similar to what dom4j (and JDOM) is for java. An API
>>that allows me to use simple python constructs, iterators and
>>collections with XPath to access and change the document's
>>content.
There are at least two other choices:
ElementTree: http://effbot.org/zone/element-index.htm
cDomlette: http://4suite.org/index.xhtml
I believe the 4Suite XPath module works with cDomlette.
--
Van Gale
More information about the Python-list
mailing list