Solved

Save URL as Text (not HTML)

Posted on 1998-02-13
6
325 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
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 will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.
Suggested Courses

751 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