/**@class javax.xml.parsers.DocumentBuilder @extends java.lang.Object Defines the API to obtain DOM Document instances from an XML document. Using this class, an application programmer can obtain a {@link Document} from XML.<p> An instance of this class can be obtained from the {@link javax.xml.parsers.DocumentBuilderFactory#newDocumentBuilder()} method. Once an instance of this class is obtained, XML can be parsed from a variety of input sources. These input sources are InputStreams, Files, URLs, and SAX InputSources.<p> Note that this class reuses several classes from the SAX API. This does not require that the implementor of the underlying DOM implementation use a SAX parser to parse XML document into a <code>Document</code>. It merely requires that the implementation communicate with the application using these existing APIs. @author <a href="mailto:Jeff.Suttor@Sun.com">Jeff Suttor</a> @version $Revision: 584483 $, $Date: 2007-10-13 19:54:48 -0700 (Sat, 13 Oct 2007) $ */ var DocumentBuilder = { /**<p>Reset this <code>DocumentBuilder</code> to its original configuration.</p> <p><code>DocumentBuilder</code> is reset to the same state as when it was created with {@link javax.xml.parsers.DocumentBuilderFactory#newDocumentBuilder()}. <code>reset()</code> is designed to allow the reuse of existing <code>DocumentBuilder</code>s thus saving resources associated with the creation of new <code>DocumentBuilder</code>s.</p> <p>The reset <code>DocumentBuilder</code> is not guaranteed to have the same {@link EntityResolver} or {@link ErrorHandler} <code>Object</code>s, e.g. {@link Object#equals(Object obj)}. It is guaranteed to have a functionally equal <code>EntityResolver</code> and <code>ErrorHandler</code>.</p> @since 1.5 */ reset : function( ) {}, /**Parse the content of the given <code>InputStream</code> as an XML document and return a new DOM {@link Document} object. An <code>IllegalArgumentException</code> is thrown if the <code>InputStream</code> is null. @param {Object {InputStream}} is InputStream containing the content to be parsed. @return {Object {org.w3c.dom.Document}} <code>Document</code> result of parsing the <code>InputStream</code> @exception IOException If any IO errors occur. @exception SAXException If any parse errors occur. @see org.xml.sax.DocumentHandler */ parse : function( ) {}, /**Parse the content of the given <code>InputStream</code> as an XML document and return a new DOM {@link Document} object. An <code>IllegalArgumentException</code> is thrown if the <code>InputStream</code> is null. @param {Object {InputStream}} is InputStream containing the content to be parsed. @param {String} systemId Provide a base for resolving relative URIs. @return {Object {org.w3c.dom.Document}} A new DOM Document object. @exception IOException If any IO errors occur. @exception SAXException If any parse errors occur. @see org.xml.sax.DocumentHandler */ parse : function( ) {}, /**Parse the content of the given URI as an XML document and return a new DOM {@link Document} object. An <code>IllegalArgumentException</code> is thrown if the URI is <code>null</code> null. @param {String} uri The location of the content to be parsed. @return {Object {org.w3c.dom.Document}} A new DOM Document object. @exception IOException If any IO errors occur. @exception SAXException If any parse errors occur. @see org.xml.sax.DocumentHandler */ parse : function( ) {}, /**Parse the content of the given file as an XML document and return a new DOM {@link Document} object. An <code>IllegalArgumentException</code> is thrown if the <code>File</code> is <code>null</code> null. @param {Object {File}} f The file containing the XML to parse. @exception IOException If any IO errors occur. @exception SAXException If any parse errors occur. @see org.xml.sax.DocumentHandler @return {Object {org.w3c.dom.Document}} A new DOM Document object. */ parse : function( ) {}, /**Parse the content of the given input source as an XML document and return a new DOM {@link Document} object. An <code>IllegalArgumentException</code> is thrown if the <code>InputSource</code> is <code>null</code> null. @param {Object {InputSource}} is InputSource containing the content to be parsed. @exception IOException If any IO errors occur. @exception SAXException If any parse errors occur. @see org.xml.sax.DocumentHandler @return {Object {org.w3c.dom.Document}} A new DOM Document object. */ parse : function( ) {}, /**Indicates whether or not this parser is configured to understand namespaces. @return {Boolean} true if this parser is configured to understand namespaces; false otherwise. */ isNamespaceAware : function( ) {}, /**Indicates whether or not this parser is configured to validate XML documents. @return {Boolean} true if this parser is configured to validate XML documents; false otherwise. */ isValidating : function( ) {}, /**Specify the {@link EntityResolver} to be used to resolve entities present in the XML document to be parsed. Setting this to <code>null</code> will result in the underlying implementation using it's own default implementation and behavior. @param {Object {EntityResolver}} er The <code>EntityResolver</code> to be used to resolve entities present in the XML document to be parsed. */ setEntityResolver : function( ) {}, /**Specify the {@link ErrorHandler} to be used by the parser. Setting this to <code>null</code> will result in the underlying implementation using it's own default implementation and behavior. @param {Object {ErrorHandler}} eh The <code>ErrorHandler</code> to be used by the parser. */ setErrorHandler : function( ) {}, /**Obtain a new instance of a DOM {@link Document} object to build a DOM tree with. @return {Object {org.w3c.dom.Document}} A new instance of a DOM Document object. */ newDocument : function( ) {}, /**Obtain an instance of a {@link DOMImplementation} object. @return {Object {org.w3c.dom.DOMImplementation}} A new instance of a <code>DOMImplementation</code>. */ getDOMImplementation : function( ) {}, /**<p>Get a reference to the the {@link Schema} being used by the XML processor.</p> <p>If no schema is being used, <code>null</code> is returned.</p> @return {Object {javax.xml.validation.Schema}} {@link Schema} being used or <code>null</code> if none in use @throws UnsupportedOperationException For backward compatibility, when implementations for earlier versions of JAXP is used, this exception will be thrown. @since 1.5 */ getSchema : function( ) {}, /**<p>Get the XInclude processing mode for this parser.</p> @return {Boolean} the return value of the {@link DocumentBuilderFactory#isXIncludeAware()} when this parser was created from factory. @throws UnsupportedOperationException For backward compatibility, when implementations for earlier versions of JAXP is used, this exception will be thrown. @since 1.5 @see DocumentBuilderFactory#setXIncludeAware(boolean) */ isXIncludeAware : function( ) {}, };