splitting an XML file on the basis on basis of XML tags
bijeshn
bijeshn at gmail.com
Tue Apr 8 00:26:11 EDT 2008
On Apr 7, 5:34 pm, Stefan Behnel <stefan... at behnel.de> wrote:
> bijeshn wrote:
> > the extracted files are to be XML too. ijust need to extract it raw
> > (tags and data just like it is in the parent XML file..)
>
> Ah, so then replace the "print tostring()" line in my example by
>
> ET.ElementTree(element).write("outputfile.xml")
>
> and you're done.
>
> Stefan
thanks a lot, Stefan....
i haven't tested out your idea yet.
Will get back as soon as I do it...
More information about the Python-list
mailing list