dcsimg
HTML Parsing using javax htmlparser (how do I do it?)
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   James_Musick
Posted On:   Sunday, November 25, 2001 11:00 PM

I can't make sense of the javax.swing.text.html.parser package. I create a DocumentParser using a DTD of type "html" and call myDocumentParser.parse() giving it the appropriate arguments. I overwrite some methods like handleSimpleTag() in the parser callback class I give it...and can manage to get the parser to pring out tag = a, for example. But what I'm really trying to do is something like extract all the tags and grab the data so I can do something with it. How do I access the attributes within these tags? I feel like I'm missing something really simple. Ugh!! Thanks, James    More>>

I can't make sense of the javax.swing.text.html.parser package.


I create a DocumentParser using a DTD of type "html" and call myDocumentParser.parse() giving it the appropriate arguments.


I overwrite some methods like handleSimpleTag() in the parser callback class I give it...and can manage to get the parser to pring out tag = a, for example.


But what I'm really trying to do is something like extract all the tags and grab the data so I can do something with it.


How do I access the attributes within these tags? I feel like I'm missing something really simple. Ugh!!


Thanks,
James

   <<Less
About | Sitemap | Contact