<webmethod id="service_disorder_to_cp">
<cpcode value="91402"/>
<userid value="5D2522"/>
<encryptflag value="Y"/>
<serviceid value="5029140204"/>
<ispack value="N"/>
<sub_type value="PER_HIT"/>
<disorderdate value="2008-3-18 15:42:59"/>
<operatingtime value="2008-3-18 15:43:00"/>
<feeflag value="Y"/>
<platid value="904"/>
<fromflag value="01"/>
<stateflag value="1"/>
<planid value="600000000008933"/></webmethod>
求教大家了
<cpcode value="91402"/>
<userid value="5D2522"/>
<encryptflag value="Y"/>
<serviceid value="5029140204"/>
<ispack value="N"/>
<sub_type value="PER_HIT"/>
<disorderdate value="2008-3-18 15:42:59"/>
<operatingtime value="2008-3-18 15:43:00"/>
<feeflag value="Y"/>
<platid value="904"/>
<fromflag value="01"/>
<stateflag value="1"/>
<planid value="600000000008933"/></webmethod>
求教大家了
<?php
$firstimagelist=$doc->getElementsByTagName('firstimage');
$itemnode=$firstimagelist->item(0)->firstChild->firstChild;
$firstimagetitle=$itemnode->nodeValue;
$firstimageurl=$itemnode->nextSibling->nodeValue;
$firstimage=$firstimagelist->item(0)->firstChild->lastChild->previousSibling->getAttribute('file');
echo '<a class="tuijian_img" href="'.$firstimageurl.'" target="_blank"><img src="'.$firstimage.'" alt="" width="70" height="65" /><span>'.converString($firstimagetitle,1).'</span></a>';
?>
$xml = <<< XML
<webmethod id="service_disorder_to_cp">
<cpcode value="91402"/>
<userid value="5D2522"/>
<encryptflag value="Y"/>
<serviceid value="5029140204"/>
<ispack value="N"/>
<sub_type value="PER_HIT"/>
<disorderdate value="2008-3-18 15:42:59"/>
<operatingtime value="2008-3-18 15:43:00"/>
<feeflag value="Y"/>
<platid value="904"/>
<fromflag value="01"/>
<stateflag value="1"/>
<planid value="600000000008933"/> </webmethod>
XML;
$x = simplexml_load_string($xml);
print_r($x);
?>
SimpleXMLElement Object
(
[@attributes] => Array
(
[id] => service_disorder_to_cp
) [cpcode] => SimpleXMLElement Object
(
[@attributes] => Array
(
[value] => 91402
) ) [userid] => SimpleXMLElement Object
(
[@attributes] => Array
(
[value] => 5D2522
) ) [encryptflag] => SimpleXMLElement Object
(
[@attributes] => Array
(
[value] => Y
) ) [serviceid] => SimpleXMLElement Object
(
[@attributes] => Array
(
[value] => 5029140204
) ) [ispack] => SimpleXMLElement Object
(
[@attributes] => Array
(
[value] => N
) ) [sub_type] => SimpleXMLElement Object
(
[@attributes] => Array
(
[value] => PER_HIT
) ) [disorderdate] => SimpleXMLElement Object
(
[@attributes] => Array
(
[value] => 2008-3-18 15:42:59
) ) [operatingtime] => SimpleXMLElement Object
(
[@attributes] => Array
(
[value] => 2008-3-18 15:43:00
) ) [feeflag] => SimpleXMLElement Object
(
[@attributes] => Array
(
[value] => Y
) ) [platid] => SimpleXMLElement Object
(
[@attributes] => Array
(
[value] => 904
) ) [fromflag] => SimpleXMLElement Object
(
[@attributes] => Array
(
[value] => 01
) ) [stateflag] => SimpleXMLElement Object
(
[@attributes] => Array
(
[value] => 1
) ) [planid] => SimpleXMLElement Object
(
[@attributes] => Array
(
[value] => 600000000008933
) ))