php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #17949 bad behaviour of xmlrpc_decode() with xml content in string
Submitted: 2002-06-24 13:29 UTC Modified: 2002-06-24 16:18 UTC
Votes:1
Avg. Score:4.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: bruno dot pennec at netcourrier dot com Assigned:
Status: Not a bug Package: XMLRPC-EPI related
PHP Version: 4.2.1 OS: linux 2.4
Private report: No CVE-ID: None
 [2002-06-24 13:29 UTC] bruno dot pennec at netcourrier dot com
/**
This code is a xmlrpc server response. One variable contain a xml fragment in which special characters have been "escaped".
The result is :
     bad value 
instead of :
 <qos> <state id='OK'/> <sender>bad value</sender>  </qos>

it is really annoying for exchanging xml documents with each others
**/



<?php

$src = <<<toto
<?xml version="1.0" encoding="ISO-8859-1"?>
<methodResponse>
  <params>
     <param>
        <value>
           <array>
              <data>
                 <value>
                    <array>
                       <data>
                         <value><base64>MzAxMDU2MA==</base64></value>
                         <value><string>&lt;qos&gt; &lt;state id='OK'/&gt; &lt;sender&gt;bad value&lt;/sender&gt;  &lt;/qos&gt;</string></value>
                       </data>
                    </array>
                 </value>
              </data>
           </array>
        </value>
     </param>
  </params>
</methodResponse>
toto
;

print_r( xmlrpc_decode($src));

?>

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-06-24 14:15 UTC] bruno dot pennec at netcourrier dot com
sorry, result content for second value must be 
<qos> <state id='OK'> <sender>bad value</sender> </qos>
 [2002-06-24 16:18 UTC] bruno dot pennec at netcourrier dot com
not php fault,mine !
xml_decode works fine !
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 12:01:31 2024 UTC