Selecting nodes with XPATH is alot easier.
var query = nameobj[0].firstChild.data;
response.selectNodes("(//FIRST|//LAST)[text()='"+query+"']")
Sadly Microsoft and Firefox have a different model for selecting with Xpath so there's basically 2 solutions prototype selectNodes
in FireFox as is shown here.
Or by including a great XML cross browser wrapper like Sarissa.
Depending on your needs the first might be good enough. If your planning on doing alot of stuff with XML in the browser investing in Sarissa will pay off tenfold.
Martijn Laarman
2009-09-22 19:43:41