如何从对象打印xml标签

时间:2019-04-02 10:21:53

标签: php xml

我有通过Web服务获取对象的代码:

$params->xmlRequest = $paramsStr;

$result = $s->__call("SubmitXmlString",array($params));
$obj_pros = get_object_vars($result);
$full_xml =  $obj_pros['SubmitXmlStringResult'];    
$full_xml = simplexml_load_string($full_xml);   

当我打印回复时,它看起来像这样:

SimpleXMLElement Object
(
    [NewDataSet] => SimpleXMLElement Object
        (
            [Table] => SimpleXMLElement Object
                (
                    [Column1] => <cycles_data><general><GrpPnrLstAttrCode>FNX</GrpPnrLstAttrCode><logo_Id>8</logo_Id>

我如何仅打印标签"<general>"的内容?

0 个答案:

没有答案