HTML parser

A

ABAKUS

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);
}
 
J

JavaJug

ABAKUS said:
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);
}

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

--
"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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,139
Latest member
JamaalCald
Top