Linuc Posted September 4, 2014 Share Posted September 4, 2014 Hi, I am trying to access the value for Admin1 as per using PHP Dom: <domain:contact type="admin">Admin1</domain:contact> I tried many varients, like: $admin = $doc->getElementsByTagName('contact')->item(0)->childNodes->getElementsByTagName('type')->item(0)->nodeValue; No luck. Any advise would be appreciated. Quote Link to comment Share on other sites More sharing options...
CroNiX Posted September 4, 2014 Share Posted September 4, 2014 It's namespaced, so you need to use getElementsByTagNameNS() http://php.net/manual/en/domdocument.getelementsbytagnamens.php Quote Link to comment Share on other sites More sharing options...
Linuc Posted September 5, 2014 Author Share Posted September 5, 2014 I have tried getElementsByTagNameNS(), can you possibly provide an example? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.