Article View: borland.public.jbuilder.java.swing
Article #8445Re: How to read attributes of an HTML page
From: Rich Wilkman
Date: Sat, 19 Aug 2000 00:00
Date: Sat, 19 Aug 2000 00:00
62 lines
2245 bytes
2245 bytes
Anand: It's just a file no matter where you read it from. Web 'scraping' isn't difficult; just tedious and slow if you have to analyise the file one character at a time. It's a little easier if you have a general idea of where in the file the attribute will fall. -Rich My News Group wrote: > > Hi, > That is fine..but my problem is I want to read the attributes of HTML page > on the servlet. > > How can i achieve this..? > > Thanks > Anand > > Olaf Raether <o.raether@windsoft.de> wrote in message > news:399d0907.16636271@forums.inprise.com... > > Hey Anand, > > > > In my opinion there a two ways. > > > > 1) > > if you only want read just some attributes from a page, i would > > prefer regular expression to get the information out of the page. > > An regex implementation for java can found at > > http://jakarta.apache.org > > > > 2) > > if you have to analyse the hole page, then you need an html parser. > > You can find one at http://www.w3c.org. it�s called html tidy. > > There�s a java version available too. > > > > Olaf Raether > > o.raether@windsoft.de > > > > > > On Fri, 18 Aug 2000 14:52:23 +0530, "My News Group" > > <amudliar@hotmail.com> wrote: > > > > >Hi, > > > I have the URL of the HTML page, now i want to read the attributes > such > > >as background color etc. How vcan i achieve this?? > > > > > >Sample code is appreciated. > > > > > >Hint : HTMLDocument class models the HTML page. > > > > > >Thanks > > >Anand > > > > > > > > > > > > > > > > > > > >
Technical Details
Message-ID:
<399F5F17.B4F71EA7@formlessvoid.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<8niuhp$79f4@bornews.borland.com> <399d0907.16636271@forums.inprise.com> <8nl3p6$pqc8@bornews.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII X-Google-Thread: 111d45,26c3f125d583390a X-Google-Attributes: gid111d45,public From: Rich Wilkman <richw@formlessvoid.com> Subject: Re: How to read attributes of an HTML page Date: 2000/08/19 Message-ID: <399F5F17.B4F71EA7@formlessvoid.com> X-Deja-AN: 660277356 Content-Transfer-Encoding: 8bit References: <8niuhp$79f4@bornews.borland.com> <399d0907.16636271@forums.inprise.com> <8nl3p6$pqc8@bornews.borland.com> X-Accept-Language: en Content-Type: text/plain; charset=iso-8859-1 X-Trace: 19 Aug 2000 21:20:17 -0800, 165.227.58.108 MIME-Version: 1.0 Reply-To: richw@formlessvoid.com Newsgroups: borland.public.jbuilder.java.swing