[XML-SIG] Simple DOM API a la dom4j/jdom
Matt G.
matt_g_@hotmail.com
Wed, 17 Jul 2002 03:03:17 +0000
>Does such a thing exist with a BSD-style license somewhere for Python?
>Now that I try to use XML again after a long time, I find the DOM API
>just too clumsy, and have written a very basic DOM wrapper that allows
>me to do things like:
>
>doc = reader.fromStream(open("flow.xml"))
>print DOMWrapper(doc)["startnode"][0].name
> ^ ^ ^ ^
> Wrapper Element coll.| attribute
> |
> First element, also supports iterators
It seems that you want either XPath (http://www.w3c.org/TR/xpath) or XML
Query (http://www.w3c.org/XML/Query). I agree that, for navigating a large
document, these are definitely the way to go. 4Suite includes an XPath
implementation, and uses the Apache license (I don't know if that's similar
enough to the BSD license, for you). I assume their XPath package is used
by their XSLT processor, in which case it's must be pretty solid.
I poked around at the API documentation, and didn't find such a high-level
interface as you seem to want. Maybe I just missed it. If not, I think
it's a shame, since I wanted to use XPath w/ DOM, too.
Good luck,
Matt Gruenke
_________________________________________________________________
Send and receive Hotmail on your mobile device: http://mobile.msn.com