本文介绍了php中的XML解析错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我必须从Web服务中获取XML格式的php输出,然后将这些值填入下拉列表,输出XML已完成,但在填充下拉列表时遇到问题,使用它,同时打破XML值,消息来了PHP无法将字符串解析为XML错误消息



用于检索XML中的Web服务的代码





$ client = new SoapClient(http:// localhost / ETaxHiber / ETaxReg?wsdl,array(trace=> 1));



$ result = $ client-> GetDivision();

echo响应:\ n;。$ client-> __ getLastResponse();

?>



和输出我获得





< divisionslist>

< divisions>< divid> 01< divname> Meerut< divisions>< divid> 02< divname> Saharanpur< divisions>< ; divid> 03< divname> Agra< divisions>< divid> 04< divname> Aligarh< division>& lt; divid> 05< divname> Moradabad< divisions> < divid> 06< divname> Bareilly< divisions> < divid> 07< divname> Lucknow< divisions> < divid> 08< divname> Faizabad< divisions> < divid> 09< divname> Devipatan< divisions> < divid> 10< divname> Gorakhpur< divisions> < divid> 11< divname> Basti< divisions> < divid> 12< divname> Azamgarh< divisions> < divid> 13< divname> Vindhyanchal< divisions> < divid> 14< divname> Varanasi< division> < divid> 15< divname> Allahabad< divisions> < divid> 16< divname> Kanpur< divisions> < divid> 17< divname> Jhansi< divisions> < divid> 18< divname> Chitrakootdham



如何填写投递箱......









请帮助我

i have to take a php output in XML format from web services, and then fills those values into drop down, output XML is completed , but i am getting problem while filling drop down , with it, while breaking XML values, the message as come"String could not be parsed as XML' error message in PHP"

code for retrieve web services in XML


$client = new SoapClient(http://localhost/ETaxHiber/ETaxReg?wsdl",array("trace"=>1 ));

$result = $client->GetDivision();
echo "Response:\n"; . $client->__getLastResponse();
?>

and output iam getting


<divisionslist>
<divisions> <divid>01 <divname>Meerut <divisions> <divid>02 <divname>Saharanpur <divisions> <divid>03 <divname>Agra <divisions> <divid>04 <divname>Aligarh <divisions> <divid>05 <divname>Moradabad <divisions> <divid>06 <divname>Bareilly <divisions> <divid>07 <divname>Lucknow <divisions> <divid>08 <divname>Faizabad <divisions> <divid>09 <divname>Devipatan <divisions> <divid>10 <divname>Gorakhpur <divisions> <divid>11 <divname>Basti <divisions> <divid>12 <divname>Azamgarh <divisions> <divid>13 <divname>Vindhyanchal <divisions> <divid>14 <divname>Varanasi <divisions> <divid>15 <divname>Allahabad <divisions> <divid>16 <divname>Kanpur <divisions> <divid>17 <divname>Jhansi <divisions> <divid>18 <divname>Chitrakootdham

how can i fill drop box ......




kindly help me

推荐答案




这篇关于php中的XML解析错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-14 05:32