Open Codex technology :: python :: xmltramp-model

2003 Nov 14 | XML Tramp Data Model

I've been playing with Aaron Swarz's XML Tramp as an intuitive/pythonic way of processing XML. The model/syntax isn't explicitly documented, but from the source and (mostly) examples, this is what I've figured out:

XML Tramp Conventions

this entry posted to technology/python;
comments (3)




Posted by anders at Sun Nov 16 18:31:50 2003
i think the dot notation is more pythonic, and the point does seem to be to make XML data accessible through a more native feeling API.

are you really suggesting doc('ns:COLOR') instead of doc(ns.COLOR)?

personally, i find XPath to be intuitive enough and don't really desire anything more pythonic, but if i did, i think i would agree with Schwarz's approach.

Posted by Joseph Reagle at Tue Nov 18 16:12:57 2003
Yep. It's not like COLOR is a (pythonic/object) attribute of some namespace instance. I think the pythonic approach is one of consistency, why remove quotes when dealing with a NS qualified element or attribute? Oh well, unless I convince Aaron, or change it for my own version, your preference will persist I presume!

I also really dig XPath (used it heavily in the C14N implementations), but again have found the "set-up" in the various toolkits to be a big pain... (What do you use?) I've recently been wondering if I could add a simple XPath query on top of XML Tramp.

Posted by anders at Thu Nov 20 00:36:50 2003
libxml2 has a pretty sweet XPath API. see: http://www.xmldatabases.org/WK/blog/607?t=item



Name:


E-mail:


URL:


Comment:


NoSpam Magic Word:
The opposite of closed (the first word of this blog's title) is?

Open Communities, Media, Source, and Standards XML

by Joseph Reagle

powered by pyblosxom


reagle.org

What I'm reading online (blogroll)


Categories

Archives