[Twisted-Python] read all the elements of xml file

Raj kumar k_r_a_j_kumar at yahoo.co.in
Sat Jan 19 08:38:01 EST 2008


 I am using following code



    content = microdom.parse(xmlfile)

    allnodes = content.getElementsByTagName("*")


    for eachnode in allnodes

        print "each node %s"  % eachnode


But getElement("*") is not working... which I used to get all the
element but it is not working. If i give any tagname then it is working.

how to get all the elemets with single statement. Because i have
different elements in that xml file. Is there any other way to get all
the elements? 

Am i doing anything wrong in that?

Thank you in advance.

      Get the freedom to save as many mails as you wish. To know how, go to http://help.yahoo.com/l/in/yahoo/mail/yahoomail/tools/tools-08.html
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://twistedmatrix.com/pipermail/twisted-python/attachments/20080119/00e73799/attachment.htm 

More information about the Twisted-Python mailing list