com.ctc.wstx.stax
Class WstxOutputFactory
java.lang.Object
javax.xml.stream.XMLOutputFactory
org.codehaus.stax2.XMLOutputFactory2
com.ctc.wstx.stax.WstxOutputFactory
- All Implemented Interfaces:
- OutputConfigFlags, XMLStreamProperties
public final class WstxOutputFactory
- extends XMLOutputFactory2
- implements OutputConfigFlags
Implementation of XMLOutputFactory
for Wstx.
TODO:
- Implement outputter that creates SAX events
- Implement outputter that builds DOM trees
Fields inherited from class javax.xml.stream.XMLOutputFactory |
IS_REPAIRING_NAMESPACES |
Fields inherited from interface com.ctc.wstx.cfg.OutputConfigFlags |
CFG_AUTOMATIC_EMPTY_ELEMS, CFG_AUTOMATIC_NS, CFG_COPY_DEFAULT_ATTRS, CFG_ENABLE_NS, CFG_ESCAPE_CR, CFG_FIX_CONTENT, CFG_OUTPUT_CDATA_AS_TEXT, CFG_VALIDATE_ATTR, CFG_VALIDATE_CONTENT, CFG_VALIDATE_NAMES, CFG_VALIDATE_STRUCTURE |
Methods inherited from class javax.xml.stream.XMLOutputFactory |
newInstance, newInstance |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
mConfig
protected final WriterConfig mConfig
WstxOutputFactory
public WstxOutputFactory()
createXMLEventWriter
public javax.xml.stream.XMLEventWriter createXMLEventWriter(java.io.OutputStream out)
throws javax.xml.stream.XMLStreamException
- Specified by:
createXMLEventWriter
in class javax.xml.stream.XMLOutputFactory
- Throws:
javax.xml.stream.XMLStreamException
createXMLEventWriter
public javax.xml.stream.XMLEventWriter createXMLEventWriter(java.io.OutputStream out,
java.lang.String enc)
throws javax.xml.stream.XMLStreamException
- Specified by:
createXMLEventWriter
in class javax.xml.stream.XMLOutputFactory
- Throws:
javax.xml.stream.XMLStreamException
createXMLEventWriter
public javax.xml.stream.XMLEventWriter createXMLEventWriter(javax.xml.transform.Result result)
throws javax.xml.stream.XMLStreamException
- Specified by:
createXMLEventWriter
in class javax.xml.stream.XMLOutputFactory
- Throws:
javax.xml.stream.XMLStreamException
createXMLEventWriter
public javax.xml.stream.XMLEventWriter createXMLEventWriter(java.io.Writer w)
throws javax.xml.stream.XMLStreamException
- Specified by:
createXMLEventWriter
in class javax.xml.stream.XMLOutputFactory
- Throws:
javax.xml.stream.XMLStreamException
createXMLStreamWriter
public javax.xml.stream.XMLStreamWriter createXMLStreamWriter(java.io.OutputStream out)
throws javax.xml.stream.XMLStreamException
- Specified by:
createXMLStreamWriter
in class javax.xml.stream.XMLOutputFactory
- Throws:
javax.xml.stream.XMLStreamException
createXMLStreamWriter
public javax.xml.stream.XMLStreamWriter createXMLStreamWriter(java.io.OutputStream out,
java.lang.String enc)
throws javax.xml.stream.XMLStreamException
- Specified by:
createXMLStreamWriter
in class javax.xml.stream.XMLOutputFactory
- Throws:
javax.xml.stream.XMLStreamException
createXMLStreamWriter
public javax.xml.stream.XMLStreamWriter createXMLStreamWriter(javax.xml.transform.Result result)
throws javax.xml.stream.XMLStreamException
- Specified by:
createXMLStreamWriter
in class javax.xml.stream.XMLOutputFactory
- Throws:
javax.xml.stream.XMLStreamException
createXMLStreamWriter
public javax.xml.stream.XMLStreamWriter createXMLStreamWriter(java.io.Writer w)
throws javax.xml.stream.XMLStreamException
- Specified by:
createXMLStreamWriter
in class javax.xml.stream.XMLOutputFactory
- Throws:
javax.xml.stream.XMLStreamException
getProperty
public java.lang.Object getProperty(java.lang.String name)
- Specified by:
getProperty
in class javax.xml.stream.XMLOutputFactory
isPropertySupported
public boolean isPropertySupported(java.lang.String name)
- Specified by:
isPropertySupported
in class javax.xml.stream.XMLOutputFactory
setProperty
public void setProperty(java.lang.String name,
java.lang.Object value)
- Specified by:
setProperty
in class javax.xml.stream.XMLOutputFactory
createXMLEventWriter
public javax.xml.stream.XMLEventWriter createXMLEventWriter(java.io.Writer w,
java.lang.String enc)
throws javax.xml.stream.XMLStreamException
- Specified by:
createXMLEventWriter
in class XMLOutputFactory2
- Throws:
javax.xml.stream.XMLStreamException
createXMLEventWriter
public javax.xml.stream.XMLEventWriter createXMLEventWriter(javax.xml.stream.XMLStreamWriter sw)
throws javax.xml.stream.XMLStreamException
- Specified by:
createXMLEventWriter
in class XMLOutputFactory2
- Throws:
javax.xml.stream.XMLStreamException
createXMLStreamWriter
public XMLStreamWriter2 createXMLStreamWriter(java.io.Writer w,
java.lang.String enc)
throws javax.xml.stream.XMLStreamException
- Specified by:
createXMLStreamWriter
in class XMLOutputFactory2
- Throws:
javax.xml.stream.XMLStreamException
configureForXmlConformance
public void configureForXmlConformance()
- Description copied from class:
XMLOutputFactory2
- Method call to make writer be as strict with output as possible,
ie maximize validation it does to try to catch any well-formedness
or validity problems.
This configuration does add some overhead to output process, since
it enables content checks that are overhead.
None of currently defined standard properties should be affected,
but implementations are likely to enable/disable custom
properties related to validation.
- Specified by:
configureForXmlConformance
in class XMLOutputFactory2
configureForRobustness
public void configureForRobustness()
- Description copied from class:
XMLOutputFactory2
- Method call to make writer be as robust as possible, that is, to
make it both check AND fix problems if it can.
Like XMLOutputFactory2.configureForXmlConformance()
, this configuration adds
some overhead to output process.
None of currently defined standard properties should be affected,
but implementations are likely to enable/disable custom
properties related to validation.
- Specified by:
configureForRobustness
in class XMLOutputFactory2
configureForSpeed
public void configureForSpeed()
- Description copied from class:
XMLOutputFactory2
- Method call to make writer optimize its operation for speed. This
generally disably additional checks (if any) writer does, and is
likely to disable many things that
XMLOutputFactory2.configureForXmlConformance()
(and XMLOutputFactory2.configureForRobustness()
) enables.
None of currently defined standard properties should be affected.
- Specified by:
configureForSpeed
in class XMLOutputFactory2
getConfig
public WriterConfig getConfig()