I am getting the response from the web service as below
xxx
while pars
I tried the following code it workd
speakersnode=speaker.getElementsByTagName("speaker");
for(int k=0;k<speakersnode.getLength();k++)
{
String info;
ids.addElement(((Element)speakersnode.item(k)).getAttribute("id"));
try{
info = speakersnode.item(k).getFirstChild().getNodeValue();
}catch(NullPointerException e){info="";}
vspeakers.addElement(info);
}
Try this:
speakersnode=speaker.getElementsByTagName("speaker");
for(int k=0;k<speakersnode.getLength();k++)
{
ids.addElement(((Element)speakersnode.item(k)).getAttribute("id"));
String info = speakersnode.item(k).getFirstChild().getNodeValue();
if (info == null){
info = "";
}
System.out.println("speaker "+ info );
vspeakers.addElement(info);
}
You also need to learn how to debug. And how to handle exceptions. You will lear how to fix this kind of stuff in seconds