Class HTMLPageParser
- java.lang.Object
-
- com.opensymphony.module.sitemesh.parser.HTMLPageParser
-
- All Implemented Interfaces:
PageParser
- Direct Known Subclasses:
DivExtractingPageParser
public class HTMLPageParser extends Object implements PageParser
Builds an HTMLPage object from an HTML document. This behaves similarly to the FastPageParser, however it's a complete rewrite that is simpler to add custom features to such as extraction and transformation of elements.
To customize the rules used, this class can be extended and have the userDefinedRules() methods overridden.
- Author:
- Joe Walnes
- See Also:
HTMLProcessor
-
-
Constructor Summary
Constructors Constructor Description HTMLPageParser()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
addUserDefinedRules(State html, PageBuilder page)
Page
parse(char[] data)
This builds a Page.
-
-
-
Method Detail
-
parse
public Page parse(char[] data) throws IOException
Description copied from interface:PageParser
This builds a Page.- Specified by:
parse
in interfacePageParser
- Throws:
IOException
-
addUserDefinedRules
protected void addUserDefinedRules(State html, PageBuilder page)
-
-