DocumentBuilderFactory

public abstract class DocumentBuilderFactory extends Object

Defines a factory API that enables applications to obtain a parser that produces DOM object trees from XML documents.

Protected Constructor Summary

Public Method Summary

abstract Object
getAttribute(String name)
Allows the user to retrieve specific attributes on the underlying implementation.
abstract boolean
getFeature(String name)

Get the state of the named feature.

Schema
getSchema()
Gets the Schema object specified through the setSchema(Schema) method.
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 in element content.
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.
boolean
isXIncludeAware()

Get state of XInclude processing.

abstract DocumentBuilder
newDocumentBuilder()
Creates a new instance of a DocumentBuilder using the currently configured parameters.
static DocumentBuilderFactory
newInstance(String factoryClassName, ClassLoader classLoader)
Returns an instance of the named implementation of DocumentBuilderFactory.
static DocumentBuilderFactory
newInstance()
Returns Android's implementation of DocumentBuilderFactory.
abstract void
setAttribute(String name, 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.
abstract void
setFeature(String name, boolean value)

Set a feature for this DocumentBuilderFactory and DocumentBuilders created by this factory.

void
setIgnoringComments(boolean ignoreComments)

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

void
setIgnoringElementContentWhitespace(boolean whitespace)
Specifies that the parsers created by this factory must eliminate whitespace in element content (sometimes known loosely as 'ignorable whitespace') when parsing XML documents (see XML Rec 2.10).
void
setNamespaceAware(boolean awareness)
Specifies that the parser produced by this code will provide support for XML namespaces.
void
setSchema(Schema schema)

Set the Schema to be used by parsers created from this factory.

void
setValidating(boolean validating)
Specifies that the parser produced by this code will validate documents as they are parsed.
void
setXIncludeAware(boolean state)

Set state of XInclude processing.

Inherited Method Summary

Protected Constructors

protected DocumentBuilderFactory ()

Public Methods

public abstract Object getAttribute (String name)

Allows the user to retrieve specific attributes on the underlying implementation.

Parameters
name The name of the attribute.
Returns