You could do it trivially with javax.swing.text.html.parser.DocumentParser - read the Java SE API doc for that class and implement your own ParserCallback. You'll have to override handleStartTag and...