The XML is:<br><br><?xml version="1.0" encoding="UTF-8"?><br><results><br><suite success="2" failures="0" name="Test 1"><br> <case status="PASSED" time="25.21 sec" ><br>
<system-out><![CDATA[Test Program Metadata class. <br> Metadata Key 'duration;valtype=uint32;timescale=90000', value 21762000<br> Metadata Key 'date;valtype=wchar*', value '20030414T044847.000Z'<br>
Metadata Key 'description;valtype=wchar*;iso-639-2-lang=jpn;orig-char-enc=UTF-8', value 'f(3gpÕ¡¤ë' <br> Metadata Key 'title;valtype=wchar*;iso-639-2-lang=jpn;orig-char-enc=UTF-8', value 'pa_st_2000'<br>
Metadata Key 'author;valtype=wchar*;iso-639-2-lang=jpn;orig-char-enc=UTF-8', value 'ɳâ_BBBBBBBBBBBBBBBBBBBBBBBBBBB'<br> Metadata Key 'track-inf;valtype=char*;index=0', value 'ES'<br>
<br> ]]></system-out><br> </case><br></suite></results><br><br>Thanks,<br>Gurpreet<br><br><div class="gmail_quote">On Tue, Mar 18, 2008 at 1:22 PM, Anand Balachandran Pillai <<a href="mailto:abpillai@gmail.com">abpillai@gmail.com</a>> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Is the garbage CDATA or attribute data ?<br>
<br>
CDATA is like <elem>text</elem> and attribute<br>
is <elem attr="value" /><br>
<br>
Can you pase the relevant part of the XML file here or if it is<br>
small enough, the complete XML file ? Send it directly to me<br>
since the list removes attachments.<br>
<br>
--Anand<br>
<br>
On Tue, Mar 18, 2008 at 11:05 AM, Gurpreet Sachdeva<br>
<div><div></div><div class="Wj3C7c"><<a href="mailto:gurpreet.sachdeva@gmail.com">gurpreet.sachdeva@gmail.com</a>> wrote:<br>
> <?xml version="1.0" encoding="UTF-8"?><br>
><br>
> Still the problem exists.<br>
><br>
> - Gurpreet<br>
><br>
><br>
><br>
> On Tue, Mar 18, 2008 at 10:44 AM, Anand Balachandran Pillai<br>
> <<a href="mailto:abpillai@gmail.com">abpillai@gmail.com</a>> wrote:<br>
><br>
> > What is the encoding of your XML file ? i.e in the<br>
> > string "<?xml version="1.0" encoding="<encoding>"?>,<br>
> > what is <encoding> ?<br>
> ><br>
> > Make sure it is an encoding like utf-8 or iso-8859-1<br>
> > which can help the parser to understand garbage<br>
> > chars.<br>
> ><br>
> > --Anand<br>
> ><br>
> ><br>
> ><br>
> ><br>
> ><br>
> > On Tue, Mar 18, 2008 at 10:38 AM, Gurpreet Sachdeva<br>
> > <<a href="mailto:gurpreet.sachdeva@gmail.com">gurpreet.sachdeva@gmail.com</a>> wrote:<br>
> > > Hi,<br>
> > ><br>
> > > Any idea how to handle the unicode characters existing in an xml file<br>
> while<br>
> > > parsing it.<br>
> > ><br>
> > > This is what I am doing:<br>
> > ><br>
> > > from xml.dom import minidom<br>
> > ><br>
> > > xmlObj = minidom.parse(fileobj)<br>
> > ><br>
> > > And the script throws an error because of some special characters ['f<br>
> > > (3gpÕ¡¤ë'] present in the xml file. Any suggestion/pointers would be<br>
> > > appreciated<br>
> > ><br>
> > > Thanks and Regards,<br>
> > > Gurpreet Singh<br>
> > > _______________________________________________<br>
> > > BangPypers mailing list<br>
> > > <a href="mailto:BangPypers@python.org">BangPypers@python.org</a><br>
> > > <a href="http://mail.python.org/mailman/listinfo/bangpypers" target="_blank">http://mail.python.org/mailman/listinfo/bangpypers</a><br>
> > ><br>
> > ><br>
> ><br>
> ><br>
> ><br>
> > --<br>
> > -Anand<br>
> > _______________________________________________<br>
> > BangPypers mailing list<br>
> > <a href="mailto:BangPypers@python.org">BangPypers@python.org</a><br>
> > <a href="http://mail.python.org/mailman/listinfo/bangpypers" target="_blank">http://mail.python.org/mailman/listinfo/bangpypers</a><br>
> ><br>
><br>
><br>
><br>
> --<br>
> Thanks and Regards,<br>
> Gurpreet Singh<br>
> _______________________________________________<br>
> BangPypers mailing list<br>
> <a href="mailto:BangPypers@python.org">BangPypers@python.org</a><br>
> <a href="http://mail.python.org/mailman/listinfo/bangpypers" target="_blank">http://mail.python.org/mailman/listinfo/bangpypers</a><br>
><br>
><br>
<br>
<br>
<br>
--<br>
-Anand<br>
_______________________________________________<br>
BangPypers mailing list<br>
<a href="mailto:BangPypers@python.org">BangPypers@python.org</a><br>
<a href="http://mail.python.org/mailman/listinfo/bangpypers" target="_blank">http://mail.python.org/mailman/listinfo/bangpypers</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Thanks and Regards,<br>Gurpreet Singh