我没有得到以下xpath查询的任何结果 $url="https://example.com";
curl_setopt($ch, CURLOPT_URL, $urlDomDocument object *//* Load the HTML *//* Create a new XPathobject */
我可以简单地使用:$rss->xpath('rss/channel/item/title | rss/channel/item/description')获取这些元素,但我想使用它稍微不同一些。我想使用下面这样的foreach语句使用PHP遍历所有的<item>元素:foreach($xml->xpath('/rss/channel/item') as