|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.gargoylesoftware.htmlunit.html.HTMLParser
public final class HTMLParser
SAX parser implementation that uses the NekoHTML HTMLConfiguration
to parse HTML into a HtmlUnit-specific DOM (HU-DOM) tree.
Field Summary | |
---|---|
static String |
XHTML_NAMESPACE
XHTML namespace. |
Method Summary | |
---|---|
static IElementFactory |
getFactory(String tagName)
|
static void |
parseFragment(DomNode parent,
String source)
Parses the HTML content from the given string into an object tree representation. |
static HtmlPage |
parseHtml(WebResponse webResponse,
WebWindow webWindow)
Parses the HTML content from the specified WebResponse into an object tree representation. |
static XHtmlPage |
parseXHtml(WebResponse webResponse,
WebWindow webWindow)
Parses the XHTML content from the specified WebResponse into an object tree representation. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String XHTML_NAMESPACE
Method Detail |
---|
public static IElementFactory getFactory(String tagName)
tagName
- an HTML element tag name
public static void parseFragment(DomNode parent, String source) throws SAXException, IOException
parent
- the parent for the new nodessource
- the (X)HTML to be parsed
SAXException
- if a SAX error occurs
IOException
- if an IO error occurspublic static HtmlPage parseHtml(WebResponse webResponse, WebWindow webWindow) throws IOException
webResponse
- the response datawebWindow
- the web window into which the page is to be loaded
IOException
- if there is an IO errorpublic static XHtmlPage parseXHtml(WebResponse webResponse, WebWindow webWindow) throws IOException
webResponse
- the response datawebWindow
- the web window into which the page is to be loaded
IOException
- if there is an IO error
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |