Overview | Package | Class | Tree | Deprecated | Index | Help
| Xerces 1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## javax.xml.parsers
Class DocumentBuilderFactory

    java.lang.Object
      |
      +--javax.xml.parsers.DocumentBuilderFactory

public abstract class DocumentBuilderFactory
extends java.lang.Object

The `DocumentBuilderFactory` defines a factory API that enables applications to configure and obtain a parser to parse XML documents into a DOM Document tree.
ATTENTION: THIS IMPLEMENTATION OF THE "JAVAX.XML.PARSER" CLASSES IS NOT THE OFFICIAL REFERENCE IMPLEMENTATION OF THE JAVA SPECIFICATION REQUEST 5 FOUND AT http://java.sun.com/aboutJava/communityprocess/jsr/jsr_005_xml.html
THIS IMPLEMENTATION IS CONFORMANT TO THE "JAVA API FOR XML PARSING" SPECIFICATION VERSION 1.1 PUBLIC REVIEW 1 BY JAMES DUNCAN DAVIDSON PUBLISHED BY SUN MICROSYSTEMS ON NOV. 2, 2000 AND FOUND AT http://java.sun.com/xml
THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Version:
  1.0 CVS $Revision: 1.6 $ $Date: 2001/02/03 00:28:58 $

Constructor Summary
`protected` | `DocumentBuilderFactory()`

Method Summary
`abstract java.lang.Object` | `getAttribute(java.lang.String name)` Allows the user to retrieve specific attributes on the underlying implementation.
`boolean` | `isCoalescing()` Indicates whether or not the factory is configured to produce parsers which converts CDATA nodes to Text nodes and appends it to the adjacent (if any) Text node.
`boolean` | `isExpandEntityReferences()` Indicates whether or not the factory is configured to produce parsers which expand entity reference nodes.
`boolean` | `isIgnoringComments()` Indicates whether or not the factory is configured to produce parsers which ignores comments.
`boolean` | `isIgnoringElementContentWhitespace()` Indicates whether or not the factory is configured to produce parsers which ignore "ignorable whitespace" when validated in the XML content during parse.
`boolean` | `isNamespaceAware()` Indicates whether or not the factory is configured to produce parsers which are namespace aware.
`boolean` | `isValidating()` Indicates whether or not the factory is configured to produce parsers which validate the XML content during parse.
`abstract DocumentBuilder` | `newDocumentBuilder()` Creates a new instance of a DocumentBuilder using the currently configured parameters.
`static DocumentBuilderFactory` | `newInstance()` Obtain a new instance of a `DocumentBuilderFactory`.
`abstract void` | `setAttribute(java.lang.String name, java.lang.Object value)` Allows the user to set specific attributes on the underlying implementation.
`void` | `setCoalescing(boolean coalescing)` Specifies that the parser produced by this code will convert CDATA nodes to Text nodes and append it to the adjacent (if any) text node.
`void` | `setExpandEntityReferences(boolean expandEntityRef)` Specifies that the parser produced by this code will expand entity reference nodes.
`void` | `setIgnoringComments(boolean ignoreComments)` Specifies that the parser produced by this code will ignore comments.
`void` | `setIgnoringElementContentWhitespace(boolean whitespace)` Specifies that the parser produced by this code will ignore "ignorable whitespace" ONLY when the document is validated as they are parsed.
`void` | `setNamespaceAware(boolean awareness)` Specifies that the parser produced by this code will provide support for XML namespaces.
`void` | `setValidating(boolean validating)` Specifies that the parser produced by this code will validate documents as they are parsed.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### DocumentBuilderFactory

    protected DocumentBuilderFactory()

Method Detail

### newInstance

    public static DocumentBuilderFactory newInstance()

  Obtain a new instance of a `DocumentBuilderFactory`. This static method creates a new factory instance based on a System property setting or uses the platform default if no property has been defined.

  The system property that controls which Factory implementation to create is named "javax.xml.parsers.DocumentBuilderFactory". This property names a class that is a concrete subclass of this abstract class. If no property is defined, a platform default will be used.

  Once an application has obtained a reference to a `DocumentBuilderFactory` it can use the factory to configure and obtain parser instances.

  Throws:
    FactoryConfigurationError - if the implementation is not available or cannot be instantiated.

### newDocumentBuilder

    public abstract DocumentBuilder newDocumentBuilder()
                                                throws ParserConfigurationException

  Creates a new instance of a DocumentBuilder using the currently configured parameters.
  Throws:
    ParserConfigurationException - if a DocumentBuilder cannot be created which satisfies the configuration requested

### setNamespaceAware

    public void setNamespaceAware(boolean awareness)

  Specifies that the parser produced by this code will provide support for XML namespaces.

### setValidating

    public void setValidating(boolean validating)

  Specifies that the parser produced by this code will validate documents as they are parsed.

### setIgnoringElementContentWhitespace

    public void setIgnoringElementContentWhitespace(boolean whitespace)

  Specifies that the parser produced by this code will ignore "ignorable whitespace" ONLY when the document is validated as they are parsed.

### setExpandEntityReferences

    public void setExpandEntityReferences(boolean expandEntityRef)

  Specifies that the parser produced by this code will expand entity reference nodes.

### setIgnoringComments

    public void setIgnoringComments(boolean ignoreComments)

  Specifies that the parser produced by this code will ignore comments.

### setCoalescing

    public void setCoalescing(boolean coalescing)

  Specifies that the parser produced by this code will convert CDATA nodes to Text nodes and append it to the adjacent (if any) text node.

### isNamespaceAware

    public boolean isNamespaceAware()

  Indicates whether or not the factory is configured to produce parsers which are namespace aware.

### isValidating

    public boolean isValidating()

  Indicates whether or not the factory is configured to produce parsers which validate the XML content during parse.

### isIgnoringElementContentWhitespace

    public boolean isIgnoringElementContentWhitespace()

  Indicates whether or not the factory is configured to produce parsers which ignore "ignorable whitespace" when validated in the XML content during parse.

### isExpandEntityReferences

    public boolean isExpandEntityReferences()

  Indicates whether or not the factory is configured to produce parsers which expand entity reference nodes.

### isIgnoringComments

    public boolean isIgnoringComments()

  Indicates whether or not the factory is configured to produce parsers which ignores comments.

### isCoalescing

    public boolean isCoalescing()

  Indicates whether or not the factory is configured to produce parsers which converts CDATA nodes to Text nodes and appends it to the adjacent (if any) Text node.

### setAttribute

    public abstract void setAttribute(java.lang.String name,
                                      java.lang.Object value)
                               throws java.lang.IllegalArgumentException

  Allows the user to set specific attributes on the underlying implementation.
  Parameters:
    `name` - The name of the attribute.
    `value` - The value of the attribute.
  Throws:
    java.lang.IllegalArgumentException - thrown if the underlying implementation doesn't recognize the attribute.

### getAttribute

    public abstract java.lang.Object getAttribute(java.lang.String name)
                                           throws java.lang.IllegalArgumentException

  Allows the user to retrieve specific attributes on the underlying implementation.
  Parameters:
    `name` - The name of the attribute.
  Returns:
    value The value of the attribute.
  Throws:
    java.lang.IllegalArgumentException - thrown if the underlying implementation doesn't recognize the attribute.

Overview | Package | Class | Tree | Deprecated | Index | Help
| Xerces 1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD