Retrieving a subset of XML nodes with PHP

前端 未结 5 1713
无人及你
无人及你 2020-12-20 00:48

Using PHP, how do I get an entire subset of nodes from an XML document? I can retrieve something like:


5条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-20 01:08

    You could use DOMDocument.GetElementsByTagName or you could:

    Use XPath?

    xpath("//certain");
    
    print_r($result);
    ?>
    

提交回复
热议问题