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