W3C home > Mailing lists > Public > html-tidy@w3.org > April to June 2003

Problem using...

From: Valmik Desai <valmik@wayne.edu>
Date: Sun, 20 Apr 2003 00:38:13 -0400
To: html-tidy@w3.org
Cc: valmik@wayne.edu
Message-Id: <a2f2e4d7.77568047.8174300@mirapointms2.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
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;
        bytes_read = in.read(buffer);
        if(bytes_read == -1)
        out.write(buffer, 0, bytes_read);

Can anyone help me in this regarding.

Valmik Desai.
Received on Sunday, 20 April 2003 00:40:48 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:06:49 UTC