- From: Valmik Desai <valmik@wayne.edu>
- Date: Sun, 20 Apr 2003 00:38:13 -0400
- To: html-tidy@w3.org
- Cc: valmik@wayne.edu
To html-tidy,
I am facing a problem using tidy.
I am trying to convert a html to xml. Tidy has been a great
help to me for this, but I am facing some problems in some cases.
The Tidy works fine when I save the html page from the browser
and the html is converted to xml witjout any errors with some
warnings.
However When I download it using a program and then run tidy
it gives me errors and I cant convert html to xml.
This is sample code in java I use to download a html:
InputStream in = null;
OutputStream out = null;
URL url = new URL("http://"+siteurl); // Create the URL
in = url.openStream(); // Open a stream to it
out = new FileOutputStream(filename);
// Now copy bytes from the URL to the output stream
byte[] buffer = new byte[4096];
int bytes_read = 0;
while(true)
{
bytes_read = in.read(buffer);
if(bytes_read == -1)
break;
out.write(buffer, 0, bytes_read);
}
Can anyone help me in this regarding.
Regards,
Valmik Desai.
Received on Sunday, 20 April 2003 00:40:48 UTC