java.lang.Object
com.sitemesh.parser.AbstractPageParser
com.sitemesh.parser.DOMPageParser
- All Implemented Interfaces:
- com.sitemesh.PageParser
- public class DOMPageParser
- extends AbstractPageParser
Implementation of com.sitemesh.PageParser that builds up a
com.sitemesh.HTMLPage using DOM.
This implementation uses OpenXML 1.2
as it is capable of parsing (and beform basic clean-up operations) on
HTML.
- Version:
- $Revision: 1.7 $
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DOMPageParser
public DOMPageParser()
parse
public com.sitemesh.Page parse(byte[] data)
throws java.io.IOException
- Send data to DOM parser and build new
DOMPage. If the data
cannot be parsed, an UnParsedPage
is returned instead.
- Specified by:
parse in interface com.sitemesh.PageParser- Specified by:
parse in class AbstractPageParser
parseHTML
private org.w3c.dom.html.HTMLDocument parseHTML(byte[] data)
throws java.io.IOException,
org.xml.sax.SAXException
- Parse the data and return a DOM HTMLDocument.