Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 346
  • Last Modified:

Save URL as Text (not HTML)

How can I save the content of a URL to a local file in plain text format (no HTML tags)?
0
friberg
Asked:
friberg
1 Solution
 
gwaltersCommented:
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
 
fribergAuthor Commented:
Of course I want to save it using Java, otherwise I wouldn't have posted it here. :-)

0
 
shogiCommented:
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
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
fribergAuthor Commented:
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
 
shogiCommented:
No, but you can simply rename your file, with xxx.TXT
0
 
KECommented:
As far as i know, you can't just get rid of the tags.
Use a FilterInputStream and discard anything between "<" and ">"

0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Tackle projects and never again get stuck behind a technical roadblock.
Join Now