RE: [xml-dev] Java NPE at node.getAttribute( )

From
John Rivett-Carnac <>
To
'Nishi Prafull' <>
Date
2005-01-24T22:00:06
ID
<>
Thread
RE: [xml-dev] Java NPE at node.getAttribute( )
I think you should get the "transport" nodes in a node collection, then get
the name attribute of each transport node: 

NodeList nodeList=xmlDocument.selectNodes("/applet/transport", nsr); 
XMLElement  node=(XMLElement)nodeList.item(0);
String trans_val1 = node.getAttribute("name");