org.lobobrowser.html.parser
Class DocumentBuilderImpl
DocumentBuilder
org.lobobrowser.html.parser.DocumentBuilderImpl
public class DocumentBuilderImpl
extends DocumentBuilder
The DocumentBuilderImpl
class is an HTML
DOM parser that implements the
standard W3C DocumentBuilder
interface.
DocumentBuilderImpl
public DocumentBuilderImpl(HtmlRendererContext rcontext)
Constructs a DocumentBuilderImpl
. This constructor
should be used when rendering is expected.
DocumentBuilderImpl
public DocumentBuilderImpl(UserAgentContext context)
Constructs a DocumentBuilderImpl
. This constructor
should be used when only the parsing functionality (without rendering)
is required.
DocumentBuilderImpl
public DocumentBuilderImpl(UserAgentContext ucontext,
HtmlRendererContext rcontext)
Constructs a DocumentBuilderImpl
. This constructor
should be used when rendering is expected.
createDocument
public Document createDocument(InputSource is)
throws SAXException,
IOException
Creates a document without parsing it so
it can be used for incremental rendering.
getDOMImplementation
public DOMImplementation getDOMImplementation()
getErrorHandler
public ErrorHandler getErrorHandler()
getResolver
public EntityResolver getResolver()
isNamespaceAware
public boolean isNamespaceAware()
isValidating
public boolean isValidating()
newDocument
public Document newDocument()
parse
public Document parse(InputSource is)
throws SAXException,
IOException
Parses an HTML document. Note that this method will read the entire
input source before returning a Document
instance.
setEntityResolver
public void setEntityResolver(EntityResolver er)
setErrorHandler
public void setErrorHandler(ErrorHandler eh)