🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.language
Article #14402

how get text from htm file

#14402
From: walter b.
Date: Sat, 04 Sep 1999 00:00
27 lines
1010 bytes
Can I get text (without tag) form a htm file?

I have written this code , but don't works.

example
if I call:
 getTextFromHtm( "jar:file:///c:/tem/myjarfile.jar!/myfile.htm")

 I get allways      "html length=0"



// my code
void getTextFromHtm(String fileHtm)  {
    try
    {
      
      HTMLDocument htmDoc= new HTMLDocument(); 
      htmDoc.setAsynchronousLoadPriority(-1); // wait for document is
loaded
       htmDoc.setBase(new  URL(fileHtm) );
      System.out.println( "html length=
"+htmDoc.getText(0,htmDoc.getLength())  );
}
catch(Exception e) {e.printStackTrace();}

  } //
Technical Details
Message-ID: <37d0f8fb.124136@forums.borland.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f74b3,53672defd1f8af70,start
X-Google-Attributes: gidf74b3,public
From: wbelcore@ats.it (walter b.)
Subject: how get text from htm file
Date: 1999/09/04
Message-ID: <37d0f8fb.124136@forums.borland.com>
X-Deja-AN: 520959805
Organization: Another Netscape Collabra Server User
Newsgroups: borland.public.jbuilder.java.language