KBD

Keith Devens .com

Wednesday, October 8, 2008 Flag waving
Of course, that's just my opinion. I could be wrong. – Dennis Miller
← Lambda the Ultimate has movedWonderfalls DVD and Firefly movie (Serenity) →

Daily link icon Sunday, June 20, 2004

Pythonic XML APIs

I'm looking for Pythonic XML APIs I've come across in the past. Basically, I want to be able to access some simple XML data in Python without having to use a SAX API or some other monstrosity.

Basically my goal is to have something as easy to use for Python as my XML library is for PHP.

So far I've (re)found Ned Batchelder's HandyXML library and Uche Ogbuji's Anobind.

Hmm... Uche Ogbuji's The State of the Python-XML Art, 2003 is probably very worth looking through.

← Lambda the Ultimate has movedWonderfalls DVD and Firefly movie (Serenity) →

Comments XML gif

Jonas Galvez (http://jonasgalvez.com/blog) wrote:

∴ Jonas Galvez | 20-Jun-2004 7:39pm est | http://jonasgalvez.com/blog | #4828

Jonas Galvez (http://jonasgalvez.com/blog) wrote:

Er.. sorry, just noticed you're already aware of libxml2. Well, I can't really recommend anything then. I've been using libxml2 for everything. Hmm... you might want to look at ElementTree:

http://effbot.org/zone/element-index.htm

∴ Jonas Galvez | 20-Jun-2004 7:44pm est | http://jonasgalvez.com/blog | #4829

Keith (http://keithdevens.com/) wrote:

just noticed you're already aware of libxml2

Yeah, I've been using libxml2 for everything. It rules.

Keith | 20-Jun-2004 9:12pm est | http://keithdevens.com/ | #4830

Keith (http://keithdevens.com/) wrote:

I should have mentioned that the reason I'm not turning to libxml2 for this particular bit of what I need to do is because, at the point I'm planning to use this, I have simple data-oriented XML I need to parse for which one of the tools linked above would be most appropriate.

Keith | 20-Jun-2004 10:54pm est | http://keithdevens.com/ | #4831

Simon Willison (http://simon.incutio.com/) wrote:

XMLTramp is pretty interesting: http://www.aaronsw.com/2002/xmltramp/

∴ Simon Willison | 21-Jun-2004 1:49am est | http://simon.incutio.com/ | #4833

Leonard Richardson (http://www.crummy.com/) wrote:

Beautiful Soup will actually work on XML as well as HTML (use the BeautifulStoneSoup class so it doesn't try to be smart about HTML), but that's assuming you've got that sort of passive-agressive mentality towards the XML you're trying to parse. If not, I second the recommendation for xmltramp; it has the same spirit as your PHP XML library.

∴ Leonard Richardson | 22-Jun-2004 10:39am est | http://www.crummy.com/ | #4834

Feel free to post a comment below. Please see my comment policy.

Formatting Rules (No HTML):

  • **bold**, *italic*, _underlined_, --strikeout--
  • "text"="url" creates a link, and URLs are auto-highlighted
  • Blockquote: Like e-mail, begin paragraph with > (greater-than sign)
  • Lists: begin paragraph with *,-, or + (unordered), or # (ordered)
  • Code block: ?!code:language=perl|php|sql|javascript|etc.{\n}...{\n}?!/code

:
(will be your IP address if blank)
: (optional)
(Will not be shown on site)

: (optional)
:

October 2008
SunMonTueWedThuFriSat
 1234
567891011
12131415161718
19202122232425
262728293031 



RSS feed RSS feed for Keith's Weblog
Atom feed Atom feed for Keith's Weblog
Weblog archive
Recent comments
  on 4 posts

Recent comments XML

new⇒Timesheet Calculator

Hadn't seen it before now, but my​company already uses a time​tracking prog...

Keith: Oct 7, 10:44am

Girls, please don't get breast implants

Hey everyone, 

I am new to this​blog and I have enjoyed reading all​your...

Sarah.M.: Oct 6, 9:45am

obout inc - ASP.NET controls

I like there components. I've got​it to work locally on my pc.​However I'm ...

Jeff: Oct 2, 4:43pm

Dumb substring behavior in C# (and Java)

Yes, the Substring function is not​helpful when you hit the length​problem,...

Mike Irving: Oct 2, 7:56am

Generated in about 0.121s.

(Used 8 db queries)

mobile phone