Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 342
  • 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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
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

Featured Post

[Webinar] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

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