2013-01-21 37 views
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 

那麼,這是否有些事情要在節點名稱:

+2

所以你需要知道的是如何獲得命名空間''節點? –

+0

我猜,我只注意到另一個帶有':'的節點也是空的。 – SnareChops

回答