Top Description Fields Constructors Methods
org.dom4j.io

public Class DocumentResult

extends SAXResult
Class Inheritance
Imports
javax.xml.transform.sax.SAXResult, org.dom4j.Document, org.xml.sax.ContentHandler, org.xml.sax.ext.LexicalHandler

DocumentResult implements a JAXP SAXResultfor a Document.

Author
James Strachan
Version
$Revision: 1.8 $

Field Summary

Modifier and TypeField and Description
private SAXContentHandler
Inherited from javax.xml.transform.sax.SAXResult:
FEATURE

Constructor Summary

AccessConstructor and Description
public
public

Method Summary

Modifier and TypeMethod and Description
public Document

Returns:

the Document created by the transformation
getDocument
()

DOCUMENT ME!

public void
setHandler(ContentHandler
Must be a non-null ContentHandler reference.
handler
)

Overrides javax.xml.transform.sax.SAXResult.setHandler.

Set the target to be a SAX2 org.xml.sax.ContentHandler.
public void
setLexicalHandler(LexicalHandler
A non-null LexicalHandler for handling lexical parse events.
handler
)

Overrides javax.xml.transform.sax.SAXResult.setLexicalHandler.

Set the SAX2 org.xml.sax.ext.LexicalHandler for the output.
Inherited from javax.xml.transform.sax.SAXResult:
getHandlergetLexicalHandlergetSystemIdsetSystemId

Field Detail

contentHandlerback to summary
private SAXContentHandler contentHandler

Constructor Detail

DocumentResultback to summary
public DocumentResult()
DocumentResultback to summary
public DocumentResult(SAXContentHandler contentHandler)

Method Detail

getDocumentback to summary
public Document getDocument()

DOCUMENT ME!

Returns:Document

the Document created by the transformation

setHandlerback to summary
public void setHandler(ContentHandler handler)

Overrides javax.xml.transform.sax.SAXResult.setHandler.

Doc from javax.xml.transform.sax.SAXResult.setHandler.

Set the target to be a SAX2 org.xml.sax.ContentHandler.

Parameters
handler:ContentHandler

Must be a non-null ContentHandler reference.

setLexicalHandlerback to summary
public void setLexicalHandler(LexicalHandler handler)

Overrides javax.xml.transform.sax.SAXResult.setLexicalHandler.

Doc from javax.xml.transform.sax.SAXResult.setLexicalHandler.

Set the SAX2 org.xml.sax.ext.LexicalHandler for the output.

This is needed to handle XML comments and the like. If the lexical handler is not set, an attempt should be made by the transformer to cast the org.xml.sax.ContentHandler to a LexicalHandler.

Parameters
handler:LexicalHandler

A non-null LexicalHandler for handling lexical parse events.