APIdia Launch Partner
Top Description Fields Constructors Methods
javax.xml.transform.sax

public Class SAXResult

extends Object
implements Result
Class Inheritance
All Implemented Interfaces
javax.xml.transform.Result
Imports
javax.xml.transform.Result, org.xml.sax.ContentHandler, org.xml.sax.ext.LexicalHandler

Acts as an holder for a transformation Result.

Author
Jeff Suttor
Since
1.4

Field Summary

Modifier and TypeField and Description
public static final String
FEATURE

If javax.xml.transform.TransformerFactory#getFeature returns true when passed this value as an argument, the Transformer supports Result output of this type.

private ContentHandler
handler

The handler for parse events.

private LexicalHandler
lexhandler

The handler for lexical events.

private String
systemId

The systemID that may be used in association with the node.

Constructor Summary

AccessConstructor and Description
public
SAXResult()

Zero-argument default constructor.

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

Create a SAXResult that targets a SAX2 org.xml.sax.ContentHandler.

Method Summary

Modifier and TypeMethod and Description
public ContentHandler

Returns:

The ContentHandler that is to be transformation output.
getHandler
()

Get the org.xml.sax.ContentHandler that is the Result.

public LexicalHandler

Returns:

A LexicalHandler, or null.
getLexicalHandler
()

Get a SAX2 org.xml.sax.ext.LexicalHandler for the output.

public String

Returns:

The system identifier that was set with setSystemId, or null if setSystemId was not called.
getSystemId
()

Implements javax.xml.transform.Result.getSystemId.

Get the system identifier that was set with setSystemId.

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

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
)

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

public void
setSystemId(String
The system identifier as a URI string.
systemId
)

Implements javax.xml.transform.Result.setSystemId.

Method setSystemId Set the systemID that may be used in association with the org.xml.sax.ContentHandler.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

FEATUREback to summary
public static final String FEATURE

If javax.xml.transform.TransformerFactory#getFeature returns true when passed this value as an argument, the Transformer supports Result output of this type.

handlerback to summary
private ContentHandler handler

The handler for parse events.

lexhandlerback to summary
private LexicalHandler lexhandler

The handler for lexical events.

systemIdback to summary
private String systemId

The systemID that may be used in association with the node.

Constructor Detail

SAXResultback to summary
public SAXResult()

Zero-argument default constructor.

SAXResultback to summary
public SAXResult(ContentHandler handler)

Create a SAXResult that targets a SAX2 org.xml.sax.ContentHandler.

Parameters
handler:ContentHandler

Must be a non-null ContentHandler reference.

Method Detail

getHandlerback to summary
public ContentHandler getHandler()

Get the org.xml.sax.ContentHandler that is the Result.

Returns:ContentHandler

The ContentHandler that is to be transformation output.

getLexicalHandlerback to summary
public LexicalHandler getLexicalHandler()

Get a SAX2 org.xml.sax.ext.LexicalHandler for the output.

Returns:LexicalHandler

A LexicalHandler, or null.

getSystemIdback to summary
public String getSystemId()

Implements javax.xml.transform.Result.getSystemId.

Get the system identifier that was set with setSystemId.

Returns:String

The system identifier that was set with setSystemId, or null if setSystemId was not called.

setHandlerback to summary
public void setHandler(ContentHandler handler)

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)

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.

setSystemIdback to summary
public void setSystemId(String systemId)

Implements javax.xml.transform.Result.setSystemId.

Method setSystemId Set the systemID that may be used in association with the org.xml.sax.ContentHandler.

Parameters
systemId:String

The system identifier as a URI string.