Thursday, July 23, 2009

XML Parsing

See Python XML parsing and Parsing simple XML files in python using etree.

Originally, I used SAX -- but built DOM objects with it. I moved from application-specific DOM's to generic DOM's.

Then I switched to the miniDOM parser. It gave me structures I could walk with a pleasant Visitor design.

Last year, I switched to Element Tree. Now I can use Visitor and the XPATH search.

1 comment:

  1. I still think of lxml as the only xml parsing library I'll ever need in Python. :-)