Dear friends,
I am using XML::Simple->XMLin function for reading data from XML file and converting into perl hash. Whenever XML data contains control characters in it, I am receiving above error. How to solve that error to convert the XML data to hash. I tried setting <?xml version="1.0" encoding="iso-8859-1"?> and <?xml version="1.0" encoding="UTF-8"?>, but still I am unable to parse the XML data to a perl hash. Kindly anyone suggest me a solution.
MY XML DATA
<EVENT>
<CALLDETAILS>
<STATIONID>01</STATIONID>
<CALLSESSIONID>00000000020712130852059</CALLSESSIONID>
<EXTENSIONNO>8143</EXTENSIONNO>
<ZIVAHCHANNELID>172.16.39.88</ZIVAHCHANNELID>
<SUBCHANNELID>0</SUBCHANNELID>
<AGENTID>NULL</AGENTID>
<CALLERID><A0>jW<B7>h<AE><F5><BF><8A>7a<B7><D8>T<D9>^N</CALLER
+ID>
<CALLEEID>NULL</CALLEEID>
<CALLTYPE>IN</CALLTYPE>
<RINGCOUNT>1</RINGCOUNT>
<CALLTERMSTATUS>NO_CTI_DATA</CALLTERMSTATUS>
</CALLDETAILS>
</EVENT>
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|