elementtree is wonderful. take a look at this source.
0 views
Skip to first unread message
Chad MILLER
unread,
May 15, 2009, 5:03:11 PM5/15/09
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to orlan...@googlegroups.com
Last weekend, I put together a program to read one XML feed and produce another XML feed*. I invite you to look at all of the source and critique or ask questions.
Near the end of both of these files, which I put here strictly for reference, http://web.chad.org/projects/orlando-crime/orlcrimefetch.py http://web.chad.org/projects/orlando-crime/orlcrimeuse.py
is the usage of elementtree, but the latter one is where I'm constructing a new XML document, and that deserves a look at how easy it is. It's easy to try to print "<" and node names and attributes..., and forget to encode something. Instead, use a programmatic interface and let it work out the details.