Solved

Save URL as Text (not HTML)

Posted on 1998-02-13
6
318 Views
Last Modified: 2012-05-05
How can I save the content of a URL to a local file in plain text format (no HTML tags)?
0
Comment
Question by:friberg
6 Comments
 
LVL 3

Expert Comment

by:gwalters
ID: 1233049
I'm assuming you wanted this in the Browser category...

For Netscape, choose File, Save As.  Type a name like "foo.txt" (the important part is the ".txt" extension).

For Internet Explorer, pretty much the same thing.


Now, if you wanted to save the content of a URL to a local file in plain text using Java, that's a different story.
0
 

Author Comment

by:friberg
ID: 1233050
Of course I want to save it using Java, otherwise I wouldn't have posted it here. :-)

0
 
LVL 2

Expert Comment

by:shogi
ID: 1233051
When you said on the local, it's on the client or on the server?
If it's on the client you can't because the security : APPLET restriction.  But, if you can have a good secur level, and it's accepted by the client, you have this possibility.  On the server you don't have any problem, except if it's not your server :)


0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

Author Comment

by:friberg
ID: 1233052
I'm talking about a Java application, not an applet. Let's say I want to capture all the text at the www.yahoo.com main page, and save it as a text file (no HTML tags) on my HD.
To save it in HTML format is no problem, but is there a way to remove the HTML tags automatically?


0
 
LVL 2

Expert Comment

by:shogi
ID: 1233053
No, but you can simply rename your file, with xxx.TXT
0
 
LVL 3

Accepted Solution

by:
KE earned 100 total points
ID: 1233054
As far as i know, you can't just get rid of the tags.
Use a FilterInputStream and discard anything between "<" and ">"

0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …

919 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now