Recommendations about xmltramp

Nelson Minar nelson at monkey.org
Fri Sep 17 21:08:12 EDT 2004


"Jonas Hei" <maps_263 at hotmail.com> writes:
> I'd like to get experts' opinion about
> xmltramp (http://www.aaronsw.com/2002/xmltramp/).

I don't know about expert, but I've used xmltramp for quick hacks on a
bunch of projects and I love it. It's the simplest API I've ever used
for accessing XML. It builds trees in memory so it's not going to work
for 100 megabyte documents. And it's fast and loose enough that I
might be nervous about using it for very meticulous work, although I
have no specific evidence of it failing. Overall it's really nice.

Here's a sample:

rssFeed = urllib.urlopen("http://.../index.rss")
rss = xmltramp.parse(rssFeed.read())

print rss.channel.title
for i in rss.channel:
  if i._name == 'item':
    print i.title

More here:
  http://www.nelson.monkey.org/~nelson/weblog/tech/good/xmltramp.html



More information about the Python-list mailing list