XML Element to String Conversion

V

vunet.us

Hello experts,
I have problems converting XML element or nodes to string as shown
below:

String newXML = null;
NodeList nodes = document.getElementsByTagName("Car");
for(int i=0; i<nodes.getLength(); i++){
Element e = (Element) nodes.item(i);
String s = e.getAttribute("Value");

if(e.equals("123")){
newXML = //HOW TO ADD "Car" NODE AS STRING?
}
return newXML;
}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,990
Messages
2,570,211
Members
46,796
Latest member
SteveBreed

Latest Threads

Top