FileDocCategorySizeDatePackage
SAXResult.javaAPI DocJava SE 5 API3540Fri Aug 26 14:58:24 BST 2005javax.xml.transform.sax

SAXResult

public class SAXResult extends Object implements Result

Acts as an holder for a transformation Result.

author
Jeff Suttor

Fields Summary
public static final String
FEATURE
If {@link 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.
Constructors Summary
public SAXResult()
Zero-argument default constructor.


            
      
    
public SAXResult(ContentHandler handler)
Create a SAXResult that targets a SAX2 {@link org.xml.sax.ContentHandler}.

param
handler Must be a non-null ContentHandler reference.

        setHandler(handler);
    
Methods Summary
public org.xml.sax.ContentHandlergetHandler()
Get the {@link org.xml.sax.ContentHandler} that is the Result.

return
The ContentHandler that is to be transformation output.

        return handler;
    
public org.xml.sax.ext.LexicalHandlergetLexicalHandler()
Get a SAX2 {@link org.xml.sax.ext.LexicalHandler} for the output.

return
A LexicalHandler, or null.

        return lexhandler;
    
public java.lang.StringgetSystemId()
Get the system identifier that was set with setSystemId.

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

        return systemId;
    
public voidsetHandler(org.xml.sax.ContentHandler handler)
Set the target to be a SAX2 {@link org.xml.sax.ContentHandler}.

param
handler Must be a non-null ContentHandler reference.

        this.handler = handler;
    
public voidsetLexicalHandler(org.xml.sax.ext.LexicalHandler handler)
Set the SAX2 {@link 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 {@link org.xml.sax.ContentHandler} to a LexicalHandler.

param
handler A non-null LexicalHandler for handling lexical parse events.

        this.lexhandler = handler;
    
public voidsetSystemId(java.lang.String systemId)
Method setSystemId Set the systemID that may be used in association with the {@link org.xml.sax.ContentHandler}.

param
systemId The system identifier as a URI string.

        this.systemId = systemId;