Processing XML File
Adam Tauno Williams
awilliam at opengroupware.us
Fri Jan 29 13:04:44 EST 2010
On Fri, 2010-01-29 at 09:25 -0800, jakecjacobson wrote:
> I need to take a XML web resource and split it up into smaller XML
> files. I am able to retrieve the web resource but I can't find any
> good XML examples. I am just learning Python so forgive me if this
> question has been answered many times in the past.
> My resource is like:
> <document>
> ...
> ...
> </document>
> <document>
> ...
> ...
> </document>
> So in this example, I would need to output 2 files with the contents
> of each file what is between the open and close document tag.
Do you want to parse the document or SaX?
I have a SaX example at
<http://coils.hg.sourceforge.net/hgweb/coils/coils/file/99b227b08f7f/src/coils/logic/workflow/xml/bpml.py>
More information about the Python-list
mailing list