| java.lang.Object com.gargoylesoftware.htmlunit.html.HTMLParser
HTMLParser | final public class HTMLParser (Code) | | SAX parser implementation that uses the neko
org.cyberneko.html.HTMLConfiguration to parse HTML into a HtmlUnit-specific DOM (HU-DOM) tree.
Note that the parser currently does not handle CDATA or comment sections, i.e. these
do not appear in the resulting DOM tree
version: $Revision: 2132 $ author: Christian Sell author: David K. Taylor author: Chris Erskine author: Ahmed Ashour |
extractNestedException | static Throwable extractNestedException(Throwable e)(Code) | | Extract nested exception within an XNIException
(Nekohtml uses reflection and generated exceptions are wrapped many times
within XNIException and InvocationTargetException)
Parameters: e - the original XNIException the cause exception |
getFactory | public static IElementFactory getFactory(String tagName)(Code) | | Parameters: tagName - an HTML element tag name a factory for creating HtmlElements representing the given tag |
getIgnoreOutsideContent | public static boolean getIgnoreOutsideContent()(Code) | | Get the state of the flag to ignore content outside the BODY and HTML tags
- The current state |
parse | public static HtmlPage parse(WebResponse webResponse, WebWindow webWindow) throws IOException(Code) | | parse the HTML content from the given WebResponse into an object tree representation
Parameters: webResponse - the response data Parameters: webWindow - the web window into which the page is to be loaded the page object which forms the root of the DOM tree, or null if the <HTML>tag is missing throws: java.io.IOException - io error |
parseFragment | public static void parseFragment(DomNode parent, String source) throws SAXException, IOException(Code) | | Parses the HTML content from the given string into an object tree representation.
Parameters: parent - the parent for the new nodes Parameters: source - the (X)HTML to be parsed throws: SAXException - if a SAX error occurs throws: IOException - if an IO error occurs |
setIgnoreOutsideContent | public static void setIgnoreOutsideContent(boolean ignoreOutsideContent)(Code) | | Set the flag to control validation of the HTML content that is outside of the
BODY and HTML tags. This flag is false by default to maintain compatibility with
current NekoHTML defaults.
Parameters: ignoreOutsideContent - - boolean flag to set |
|
|