dcsimg
Why is the HTML source code changed when downloading a web page?
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   r_s
Posted On:   Thursday, March 20, 2003 08:00 PM

I'm using the following code to download a web page import java.net.*; import java.io.*; public class URLReader { public static void main(String[] args) throws Exception { URL yahoo = new URL("http://www.yahoo.com"); BufferedReader in = new BufferedReader( new InputStreamReader(yahoo.openStream())); String inputLine; while ((inputLine = in.readLine()) != null) System.out.println(inputLine); in.close(); } } I copy the output from the console and save it to a .html file. I open the file with IE and notice many errors on the page. Most of the table tags are wrong and just about all of the hyperlinks are wrong   More>>

I'm using the following code to download a web page

			
import java.net.*;
import java.io.*;

public class URLReader {
public static void main(String[] args) throws Exception {
URL yahoo = new URL("http://www.yahoo.com");
BufferedReader in = new BufferedReader( new InputStreamReader(yahoo.openStream()));

String inputLine;

while ((inputLine = in.readLine()) != null)
System.out.println(inputLine);

in.close();
}
}

I copy the output from the console and save it to a .html file. I open the file with IE and notice many errors on the page. Most of the table tags are wrong and just about all of the hyperlinks are wrong. Why is the source code for the page being changed???

   <<Less

Re: Why is the HTML source code changed when downloading a web page?

Posted By:   Christopher_Koenigsberg  
Posted On:   Friday, March 21, 2003 06:35 AM

Most of the table tags are wrong and just about all of the hyperlinks are wrong



Come on, debugging 101, "Wrong" = how? (what specific differences)

About | Sitemap | Contact