0
我正在使用php DOMDocument
來解析RSS 2.0訂閱源。除了這條線以外,一切正常。php DOMDocument getAttribute
$image = $node->getElementsByTagName('itunes:image')->item(0)->getAttribute('href');
其中$node
是<item>
元素。
$image
在函數後面爲空。
編輯:
下也返回空...
$node->getElementsByTagName('itunes:summary')->item(0)->nodeValue
那麼,這是否有些事情要在節點名稱:
?
所以你需要知道的是如何獲得命名空間''節點? –
我猜,我只注意到另一個帶有':'的節點也是空的。 – SnareChops