Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / June 2004

Tip: Looking for answers? Try searching our database.

HTML parser

Thread view: 
ABAKUS - 03 Jun 2004 08:48 GMT
Hi, Can you help me?
I try to write html parser, but nothing unacts me unknow that make wrong. I
have found something code, but I don't know what insert before this code :
if (t == HTML.Tag.META)
{
System.out.println("Inside META tage data");

String attrib = (String) a.getAttribute (HTML.Attribute.NAME);
if (attrib != null)
{
}
String content =(String) a.getAttribute(HTML.Attribute.CONTENT);
if (content != null)
{

}
String httpequiv = (String)a.getAttribute(HTML.Attribute.HTTPEQUIV);
if (httpequiv != null)
{

}
String meta = attrib + content + httpequiv;
System.out.println(meta);
}
JavaJug - 03 Jun 2004 09:18 GMT
> Hi, Can you help me?
>  I try to write html parser, but nothing unacts me unknow that make wrong. I
[quoted text clipped - 20 lines]
> System.out.println(meta);
> }

You can parse html with the Swing classes of Java.
See http://www.informit.com/articles/article.asp?p=31059&redir=1

Signature

"There is a theory which states that if ever anyone discovers exactly what the
Universe is for and why it is here, it will instantly disappear and be replaced
by something even more bizarre and inexplicable.
There is another theory which states that this has already happened."
  --  Douglas Adams

Pavel L.Yatsuk - 04 Jun 2004 11:32 GMT
Hello!
You want to write parser or parse HTML file?
If last than use http://xmlc.objectweb.org/

> Hi, Can you help me?
>  I try to write html parser, but nothing unacts me unknow that make wrong. I
[quoted text clipped - 20 lines]
> System.out.println(meta);
> }
William Brogden - 05 Jun 2004 13:57 GMT
> Hello!
> You want to write parser or parse HTML file?
[quoted text clipped - 3 lines]
>>  I try to write html parser, but nothing unacts me unknow that make
>> wrong. I

The JTidy toolkit  - http://sourceforge.net/projects/jtidy
is another possible source of inspiration for parsing HTML.
Bill
Roedy Green - 04 Jun 2004 13:34 GMT
> I try to write html parser, but nothing unacts me unknow that make wrong.

see http://mindprod.com/jgloss/parser.html

Quiotix will turn HTML into a tree you can then chase.
Signature

Canadian Mind Products, Roedy Green.
Coaching, problem solving, economical contract programming.
See http://mindprod.com/jgloss/jgloss.html for The Java Glossary.

Rogan Dawes - 07 Jun 2004 07:44 GMT
> Hi, Can you help me?
>  I try to write html parser, but nothing unacts me unknow that make wrong. I
> have found something code, but I don't know what insert before this code :

Also have a look at HTMLParser on SourceForge.net

http://sourceforge.net/projects/htmlparser/

Rogan
Signature

Rogan Dawes

*ALL* messages to discard@dawes.za.net will be dropped, and added
to my blacklist. Please respond to "nntp AT dawes DOT za DOT net"



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.