org.lobobrowser.html.parser
Class DocumentBuilderImpl

java.lang.Object
  extended by javax.xml.parsers.DocumentBuilder
      extended by org.lobobrowser.html.parser.DocumentBuilderImpl

public class DocumentBuilderImpl
extends javax.xml.parsers.DocumentBuilder

The DocumentBuilderImpl class is an HTML DOM parser that implements the standard W3C DocumentBuilder interface.


Constructor Summary
DocumentBuilderImpl(HtmlRendererContext rcontext)
          Constructs a DocumentBuilderImpl.
DocumentBuilderImpl(UserAgentContext context)
          Constructs a DocumentBuilderImpl.
DocumentBuilderImpl(UserAgentContext ucontext, HtmlRendererContext rcontext)
          Constructs a DocumentBuilderImpl.
 
Method Summary
 org.w3c.dom.Document createDocument(org.xml.sax.InputSource is)
          Creates a document without parsing the input provided, so the document object can be used for incremental rendering.
 org.w3c.dom.DOMImplementation getDOMImplementation()
           
 org.xml.sax.ErrorHandler getErrorHandler()
           
 org.xml.sax.EntityResolver getResolver()
           
 boolean isNamespaceAware()
           
 boolean isValidating()
           
 org.w3c.dom.Document newDocument()
           
 org.w3c.dom.Document parse(org.xml.sax.InputSource is)
          Parses an HTML document.
 void setEntityResolver(org.xml.sax.EntityResolver er)
           
 void setErrorHandler(org.xml.sax.ErrorHandler eh)
           
 
Methods inherited from class javax.xml.parsers.DocumentBuilder
getSchema, isXIncludeAware, parse, parse, parse, parse, reset
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DocumentBuilderImpl

public DocumentBuilderImpl(UserAgentContext context)
Constructs a DocumentBuilderImpl. This constructor should be used when only the parsing functionality (without rendering) is required.

Parameters:
context - An instance of UserAgentContext, which may be an instance of SimpleUserAgentContext.

DocumentBuilderImpl

public DocumentBuilderImpl(UserAgentContext ucontext,
                           HtmlRendererContext rcontext)
Constructs a DocumentBuilderImpl. This constructor should be used when rendering is expected.

Parameters:
ucontext - An instance of UserAgentContext, which may be an instance of SimpleUserAgentContext.
rcontext - An instance of HtmlRendererContext, which may be an instance of SimpleHtmlRendererContext.

DocumentBuilderImpl

public DocumentBuilderImpl(HtmlRendererContext rcontext)
Constructs a DocumentBuilderImpl. This constructor should be used when rendering is expected.

Parameters:
rcontext - An instance of HtmlRendererContext, which may be an instance of SimpleHtmlRendererContext.
Method Detail

parse

public org.w3c.dom.Document parse(org.xml.sax.InputSource is)
                           throws org.xml.sax.SAXException,
                                  java.io.IOException
Parses an HTML document. Note that this method will read the entire input source before returning a Document instance.

Specified by:
parse in class javax.xml.parsers.DocumentBuilder
Parameters:
is - The input source, which may be an instance of InputSourceImpl.
Throws:
org.xml.sax.SAXException
java.io.IOException
See Also:
createDocument(InputSource)

createDocument

public org.w3c.dom.Document createDocument(org.xml.sax.InputSource is)
                                    throws org.xml.sax.SAXException,
                                           java.io.IOException
Creates a document without parsing the input provided, so the document object can be used for incremental rendering.

Parameters:
is - The input source, which may be an instance of InputSourceImpl. The input source must provide either an input stream or a reader.
Throws:
org.xml.sax.SAXException
java.io.IOException
See Also:
HTMLDocumentImpl.load()

isNamespaceAware

public boolean isNamespaceAware()
Specified by:
isNamespaceAware in class javax.xml.parsers.DocumentBuilder

isValidating

public boolean isValidating()
Specified by:
isValidating in class javax.xml.parsers.DocumentBuilder

setEntityResolver

public void setEntityResolver(org.xml.sax.EntityResolver er)
Specified by:
setEntityResolver in class javax.xml.parsers.DocumentBuilder

setErrorHandler

public void setErrorHandler(org.xml.sax.ErrorHandler eh)
Specified by:
setErrorHandler in class javax.xml.parsers.DocumentBuilder

newDocument

public org.w3c.dom.Document newDocument()
Specified by:
newDocument in class javax.xml.parsers.DocumentBuilder

getDOMImplementation

public org.w3c.dom.DOMImplementation getDOMImplementation()
Specified by:
getDOMImplementation in class javax.xml.parsers.DocumentBuilder

getErrorHandler

public org.xml.sax.ErrorHandler getErrorHandler()

getResolver

public org.xml.sax.EntityResolver getResolver()


SourceForge.net LogoCopyright © 2005, 2006, 2007 The Lobo Project. All Rights Reserved.
[Cobra Project Home]