PHP getElementsByTagName DOMDocument Trouble

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
amitkgupta28
Forum Newbie
Posts: 1
Joined: Tue Sep 08, 2009 5:15 pm

PHP getElementsByTagName DOMDocument Trouble

Post 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
Post Reply