Overview

Provides methods for creating a new document and for parsing xml from a data stream to create a new document.

Attribute Summary

nametypedescription
Public
coalescingBoolean

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.

entityResolverEntityResolver

Specify the EntityResolver to be used to resolve entities present in the XML document to be parsed.

errorHandlerErrorHandler

Specify the ErrorHandler to be used by the parser.

expandEntityReferencesBoolean

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

ignoringCommentsBoolean

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

ignoringElementContentWhitespaceBoolean

Indicates whether or not the factory is configured to produce parsers which ignore ignorable whitespace in element content.

namespaceAwareBoolean

Indicates whether or not this parser is configured to understand namespaces.

validatingBoolean

Indicates whether or not this parser is configured to validate XML documents.

Protected

Inherited Attributes

Function Summary

public createDocument() : Document

Obtain a new instance of a DOM Document object to build a DOM tree with.

public parseFile(file: File, ) : Document

Parse the content of the given File as an XML document and return a new DOM Document object.

public parseInputSource(source: InputSource, ) : Document

Parse the content of the given InputSource as an XML document and return a new DOM Document object.

public parseInputStream(stream: InputStream, ) : Document

Parse the content of the given InputStream as an XML document and return a new DOM Document object.

public parseReader(reader: Reader, ) : Document

Parse the content of the given Reader as an XML document and return a new DOM Document object.

public parseText(text: String, ) : Document

Parse the content of the given String as an XML document and return a new DOM Document object.

public parseURI(uri: String, ) : Document

Parse the content of the given URI as an XML document and return a new DOM Document object.

Inherited Functions

Attributes

public coalescing: Boolean

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. By default the value of this is set to false

public entityResolver: EntityResolver

Specify the EntityResolver to be used to resolve entities present in the XML document to be parsed. Setting this to null will result in the underlying implementation using it's own default implementation and behavior.

public errorHandler: ErrorHandler

Specify the ErrorHandler to be used by the parser. Setting this to null will result in the underlying implementation using it's own default implementation and behavior.

public expandEntityReferences: Boolean

Specifies that the parser produced by this code will expand entity reference nodes. By default the value of this is set to true

public ignoringComments: Boolean

Specifies that the parser produced by this code will ignore comments. By default the value of this is set to false .

public ignoringElementContentWhitespace: Boolean

Indicates whether or not the factory is configured to produce parsers which ignore ignorable whitespace in element content.

public namespaceAware: Boolean

Indicates whether or not this parser is configured to understand namespaces. Set to true if this parser is to understand namespaces; false otherwise. Default is false.

public validating: Boolean

Indicates whether or not this parser is configured to validate XML documents. Set to true to configure to validate XML documents; false otherwise. Default is false.

Functions

public createDocument():Document

Returns
Document
A new instance of a DOM Document object.

Obtain a new instance of a DOM Document object to build a DOM tree with.

public parseFile(file: File, ):Document

Parameters
file
the File containing the XML content
Returns
Document
<code>Document</code> result of parsing

Parse the content of the given File as an XML document and return a new DOM Document object.

public parseInputSource(source: InputSource, ):Document

Parameters
source
the InputSource containing the XML content
Returns
Document
<code>Document</code> result of parsing

Parse the content of the given InputSource as an XML document and return a new DOM Document object.

public parseInputStream(stream: InputStream, ):Document

Parameters
stream
the InputStream containing the XML content
Returns
Document
<code>Document</code> result of parsing

Parse the content of the given InputStream as an XML document and return a new DOM Document object.

public parseReader(reader: Reader, ):Document

Parameters
reader
the Reader containing the XML content
Returns
Document
<code>Document</code> result of parsing

Parse the content of the given Reader as an XML document and return a new DOM Document object.

public parseText(text: String, ):Document

Parameters
text
the String containing the XML content
Returns
Document
<code>Document</code> result of parsing

Parse the content of the given String as an XML document and return a new DOM Document object.

public parseURI(uri: String, ):Document

Parameters
uri
The location of the content to be parsed.
Returns
Document
<code>Document</code> result of parsing

Parse the content of the given URI as an XML document and return a new DOM Document object.