January 8, 2008 01:00 by
jwendl
While working on a school project using wxPython and XML I was intrigued by the way that Python wants you to handle XML. You have three options, 1) expat, 2) SAX or 3) DOM. All three methods happen to be very disgusting to implement. I decided that it would be worth time spent to find a good way to convert XML to an extensible object structure. I actually found that method at this URL http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/149368. The best part of this snippet is that you can call an elements name, get their child, get the name of the child, get an attribute all really fast (because the author used expat).
Be the first to rate this post
- Currently 0/5 Stars.
- 1
- 2
- 3
- 4
- 5