Hi Michael,
The following statements generated state.xml file:
URL stateUrl = new URL("http://www.abc.com");
URLConnection stateconnection = stateUrl.openConnection();
stateisInHtml = stateconnection.getInputStream();
statedisInHtml = new DataInputStream(new
BufferedInputStream(stateisInHtml));
System.out.flush();
statefosOutHtml = new FileOutputStream("state.html");
while ((oneChar=statedisInHtml.read()) != -1)
statefosOutHtml.write(oneChar);
.....
statefrInHtml = new FileReader("state.html");
statebrInHtml = new BufferedReader(statefrInHtml);
SAXBuilder statesaxBuilder = new
SAXBuilder("org.ccil.cowan.tagsoup..Parser", false);
org.jdom.Document statejdomDocument =
statesaxBuilder.build(statebrInHtml);
XMLOutputter stateoutputter = new XMLOutputter();
statefwOutXml = new FileWriter("state.xml");
statebwOutXml = new BufferedWriter(statefwOutXml);
stateoutputter.output(statejdomDocument, statebwOutXml);
XPath had no problem looking up state.xml.
Thanks,
Jack