com.arsdigita.templating.html
Class XHTMLParser

java.lang.Object
  extended bycom.arsdigita.templating.html.XHTMLParser
All Implemented Interfaces:
HTMLParser

public class XHTMLParser
extends Object
implements HTMLParser

A SAX-based implementation of HTMLParser. Only good for parsing XHTML. One way to ensure that the incoming text is a valid XHTML fragment is to use a JTidy-based validation listener.

Since:
2002-08-21
Version:
$Date: 2004/04/07 $
Author:
Vadim Nasardinov (vadimn@redhat.com)

Constructor Summary
XHTMLParser()
           
 
Method Summary
 boolean isRegistered(String qName)
          Checks if the tag is registered with this parser.
 void parse(String html, ContentHandler handler)
          Parses the html by invoking a SAX parser.
 void registerTag(String qName)
          Registers the tag qName.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XHTMLParser

public XHTMLParser()
            throws HTMLParserException
Method Detail

registerTag

public void registerTag(String qName)
Description copied from interface: HTMLParser
Registers the tag qName.

Specified by:
registerTag in interface HTMLParser

isRegistered

public boolean isRegistered(String qName)
Description copied from interface: HTMLParser
Checks if the tag is registered with this parser.

Specified by:
isRegistered in interface HTMLParser

parse

public void parse(String html,
                  ContentHandler handler)
           throws HTMLParserException
Parses the html by invoking a SAX parser. The assumption is, of course, that html is well-formed.

Specified by:
parse in interface HTMLParser
Throws:
HTMLParserException


Copyright (c) 2004 Red Hat, Inc. Corporation. All Rights Reserved. Generated at July 20 2004:2337 UTC