Methods Summary |
---|
public org.w3c.dom.Node | getNode()
return (_handler instanceof SAX2DOM) ? ((SAX2DOM)_handler).getDOM()
: null;
|
public com.sun.org.apache.xml.internal.serializer.SerializationHandler | getSerializationHandler()
SerializationHandler result = null;
switch (_outputType)
{
case STREAM :
if (_method == null)
{
result = new ToUnknownStream();
}
else if (_method.equalsIgnoreCase("xml"))
{
result = new ToXMLStream();
}
else if (_method.equalsIgnoreCase("html"))
{
result = new ToHTMLStream();
}
else if (_method.equalsIgnoreCase("text"))
{
result = new ToTextStream();
}
if (result != null && _indentNumber >= 0)
{
result.setIndentAmount(_indentNumber);
}
result.setEncoding(_encoding);
if (_writer != null)
{
result.setWriter(_writer);
}
else
{
result.setOutputStream(_ostream);
}
return result;
case DOM :
_handler = (_node != null) ? new SAX2DOM(_node, _nextSibling) : new SAX2DOM();
_lexHandler = (LexicalHandler) _handler;
// falls through
case STAX :
if (_xmlStAXEventWriter != null) {
_handler = new SAX2StAXEventWriter(_xmlStAXEventWriter);
} else if (_xmlStAXStreamWriter != null) {
_handler = new SAX2StAXStreamWriter(_xmlStAXStreamWriter);
}
_lexHandler = (LexicalHandler) _handler;
// again falls through - Padmaja Vedula
case SAX :
if (_method == null)
{
_method = "xml"; // default case
}
if (_method.equalsIgnoreCase("xml"))
{
if (_lexHandler == null)
{
result = new ToXMLSAXHandler(_handler, _encoding);
}
else
{
result =
new ToXMLSAXHandler(
_handler,
_lexHandler,
_encoding);
}
}
else if (_method.equalsIgnoreCase("html"))
{
if (_lexHandler == null)
{
result = new ToHTMLSAXHandler(_handler, _encoding);
}
else
{
result =
new ToHTMLSAXHandler(
_handler,
_lexHandler,
_encoding);
}
}
else if (_method.equalsIgnoreCase("text"))
{
if (_lexHandler == null)
{
result = new ToTextSAXHandler(_handler, _encoding);
}
else
{
result =
new ToTextSAXHandler(
_handler,
_lexHandler,
_encoding);
}
}
return result;
}
return null;
|
public javax.xml.stream.XMLEventWriter | getXMLEventWriter()
return (_handler instanceof SAX2StAXEventWriter) ? ((SAX2StAXEventWriter) _handler).getEventWriter() : null;
|
public javax.xml.stream.XMLStreamWriter | getXMLStreamWriter()
return (_handler instanceof SAX2StAXStreamWriter) ? ((SAX2StAXStreamWriter) _handler).getStreamWriter() : null;
|
public static com.sun.org.apache.xalan.internal.xsltc.runtime.output.TransletOutputHandlerFactory | newInstance()
return new TransletOutputHandlerFactory();
|
public void | setEncoding(java.lang.String encoding)
if (encoding != null) {
_encoding = encoding;
}
|
public void | setHandler(org.xml.sax.ContentHandler handler)
_handler = handler;
|
public void | setIndentNumber(int value)
_indentNumber = value;
|
public void | setLexicalHandler(org.xml.sax.ext.LexicalHandler lex)
_lexHandler = lex;
|
public void | setNextSibling(org.w3c.dom.Node nextSibling)
_nextSibling = nextSibling;
|
public void | setNode(org.w3c.dom.Node node)
_node = node;
|
public void | setOutputMethod(java.lang.String method)
_method = method;
|
public void | setOutputStream(java.io.OutputStream ostream)
_ostream = ostream;
|
public void | setOutputType(int outputType)
_outputType = outputType;
|
public void | setWriter(java.io.Writer writer)
_writer = writer;
|
public void | setXMLEventWriter(javax.xml.stream.XMLEventWriter eventWriter)
_xmlStAXEventWriter = eventWriter;
|
public void | setXMLStreamWriter(javax.xml.stream.XMLStreamWriter streamWriter)
_xmlStAXStreamWriter = streamWriter;
|