[Twisted-Python] read all the elements of xml file
Jean-Paul Calderone
exarkun at divmod.com
Sat Jan 19 11:34:13 EST 2008
On Sat, 19 Jan 2008 19:08:01 +0530 (IST), Raj kumar <k_r_a_j_kumar at yahoo.co.in> wrote:
>Hi,
>
> I am using following code
>----------------------------------------------------------------------------------------
>
> content = microdom.parse(xmlfile)
>
> allnodes = content.getElementsByTagName("*")
>
>
>
> for eachnode in allnodes
>
> print "each node %s" % eachnode
>
I strongly recommend using a different XML library, such as xml.dom.minidom.
twisted.web.microdom will fail to perform many of the tasks you would expect
from a general purpose DOM library.
Jean-Paul
More information about the Twisted-Python
mailing list