<DIV id=RTEContent>I am having problem with parsing CDATA section. I am using PyXml and minidom for parsing the xml document. </DIV> <DIV>My motive is to get the data back in the same format in one string as it is writen in xml file. Here is the sample:</DIV> <DIV>--</DIV> <DIV><StateChg><BR> <![CDATA[<BR> check.. its cdata section</DIV> <DIV><BR> all data is printed in it s format<BR> ]]><BR><StateChg></DIV> <DIV>--</DIV> <DIV>put when I print all its childs using:</DIV> <DIV>---</DIV> <DIV> print StChg.childNodes #StChg. is instance to <StateChg> element</DIV> <DIV>--</DIV> <DIV>It gives following output</DIV> <DIV>--</DIV>
<DIV>[<DOM Text node "\n">, <DOM Text node "\t\t\t\t \t">, <DOM Text node "\n">, <DOM Text node "\t\t\t\t\t chec...">, <DOM Text node "\n">, <DOM Text node "\t\t\t\t\t all ...">, <DOM Text node "\n">, <DOM Text node "\t\t\t\t\t ">, <DOM Text node "\n">, <DOM Text node "\t\t\t\t\t">]<BR>--</DIV> <DIV> </DIV> <DIV>The output Shows it is text node but we had declare it as CDATA_SECTION_NODE.</DIV> <DIV> </DIV> <DIV>and also the output is not desired ( format lost and some data is lost), </DIV> <DIV> </DIV> <DIV>Why its happening. What I have to do to get the same output as in xml with the format and indentation.</DIV> <DIV> </DIV> <DIV>Please,correct me, where I am wrong<BR></DIV><p>
                <hr size=1>Yahoo! Shopping<br>
Find Great Deals on Holiday Gifts at <a href="http://us.rd.yahoo.com/mail_us/footer/shopping/*http://shopping.yahoo.com/;_ylc=X3oDMTE2bzVzaHJtBF9TAzk1OTQ5NjM2BHNlYwNtYWlsdGFnBHNsawNob2xpZGF5LTA1
">Yahoo! Shopping</a>