I am using rpxnow in Java, how do I use org.w3c.dom API to get the field identifier in this XML reponse for example?
<?xml version='1.0' encoding='UTF-8'?>
<rsp stat='ok'>
<profile>
<displayName>
brian
</displayName>
<identifier>
http://brian.myopenid.com/
</identifier>
<preferredUsername>
brian
</preferredUsername>
<providerName>
Other
</providerName>
<url>
http://brian.myopenid.com/
</url>
</profile>
</rsp>
Did you have a look at the API documentation of the package
org.w3c.dom? ClassElementcontains methods such asgetElementsByTagName(String name)to get child elements with a specific tag name (and other methods that might be useful). Using this API is a bit cumbersome, though. You could use XPath (see packagejavax.xml.xpath) to do it with fewer lines of code. For example (untested):