I do a GET to a
Servlet from some
Java code and I get back this one line:
<REQUEST TIMESTAMP="2004-01-15 15:38:02.153" TotalDevices="0"/>
I do not know how to parse that using XML. I realize that I could just treat it like a
string in order to get what I needed. I really do nto know where to start. This is what I tried:
DOMParser parser = new DOMParser();
parser.parse(xml); //xml var equals that line above
Document
doc = parser.getDocument();
System.out.println(doc);
Noteworthy import statements:
import org.apache.xerces.parsers.DOMParser;
import org.w3c.dom.Document;
It actually blows up at the parser.parse. It says:
java.net.MalformedURLException: no protocol: WHy? I dont know.