Page 1 of 1

PHP getElementsByTagName DOMDocument Trouble

Posted: Tue Sep 08, 2009 5:19 pm
by amitkgupta28
Hello Friends,

I am working on Google Data API. It is simple HTTP based API. Data returned is in the form of XML. I am processing this XML data using DOMDocument.

But I am not able to access particular tag having " : " ( colon ) in the name of the tag.

<gd:resourceId>pdf:12345</gd:resourceId>

How do I access this particular tag?

The following code isn't working:

$doc->getElementsByTagName("gd:resourceId");

Is there any alternative method to access this tag?

Thanks,
Amit