|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.xml.stream.XMLOutputFactory
org.codehaus.stax2.XMLOutputFactory2
public abstract class XMLOutputFactory2
Extension of XMLInputFactory
to add missing functionality
(which currently means 'nothing'...)
Also contains extended standard properties that conforming stream
writer factory and instance implementations should at least
recognize, and preferably support.
NOTE: although actual values for the property names are
visible, implementations should try to use the symbolic constants
defined here instead, to avoid typos.
Notes about properties that output factories should support:
XMLStreamProperties.XSP_NAMESPACE_AWARE
:
Whether output classes should keep track of and output namespace
information provided via write methods.
When enabled (set to Boolean.TRUE), will use all namespace information
provided, and does not allow colons in names (local name, prefix).XMLStreamProperties.XSP_PROBLEM_REPORTER
:
Field Summary | |
---|---|
static java.lang.String |
P_ATTR_VALUE_ESCAPER
Property that can be set if a custom output escaping for attribute value content is needed. |
static java.lang.String |
P_AUTOMATIC_EMPTY_ELEMENTS
Whether stream writers are allowed to automatically output empty elements, when a start element is immediately followed by matching end element. |
static java.lang.String |
P_AUTOMATIC_NS_PREFIX
Prefix to use for automatically created namespace prefixes, when namespace support is enabled, the writer is in "repairing" mode, and a new prefix name is needed. |
static java.lang.String |
P_TEXT_ESCAPER
Property that can be set if a custom output escaping for textual content is needed. |
Fields inherited from class javax.xml.stream.XMLOutputFactory |
---|
IS_REPAIRING_NAMESPACES |
Fields inherited from interface org.codehaus.stax2.XMLStreamProperties |
---|
XSP_IMPLEMENTATION_NAME, XSP_IMPLEMENTATION_VERSION, XSP_NAMESPACE_AWARE, XSP_PROBLEM_REPORTER, XSP_SUPPORT_XMLID, XSP_SUPPORTS_XML11, XSP_V_XMLID_FULL, XSP_V_XMLID_NONE, XSP_V_XMLID_TYPING |
Constructor Summary | |
---|---|
protected |
XMLOutputFactory2()
|
Method Summary | |
---|---|
abstract void |
configureForRobustness()
Method call to make writer be as robust as possible, that is, to make it both check AND fix problems if it can. |
abstract void |
configureForSpeed()
Method call to make writer optimize its operation for speed. |
abstract void |
configureForXmlConformance()
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. |
abstract javax.xml.stream.XMLEventWriter |
createXMLEventWriter(java.io.Writer w,
java.lang.String encoding)
|
abstract javax.xml.stream.XMLEventWriter |
createXMLEventWriter(javax.xml.stream.XMLStreamWriter sw)
|
abstract XMLStreamWriter2 |
createXMLStreamWriter(java.io.Writer w,
java.lang.String encoding)
|
Methods inherited from class javax.xml.stream.XMLOutputFactory |
---|
createXMLEventWriter, createXMLEventWriter, createXMLEventWriter, createXMLEventWriter, createXMLStreamWriter, createXMLStreamWriter, createXMLStreamWriter, createXMLStreamWriter, getProperty, isPropertySupported, newInstance, newInstance, setProperty |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String P_AUTOMATIC_EMPTY_ELEMENTS
Default value for implementations should be 'true'; both values should be recognized, and 'false' must be honored. However, 'true' value is only a suggestion, and need not be implemented (since there is the explicit 'writeEmptyElement()' method).
public static final java.lang.String P_AUTOMATIC_NS_PREFIX
public static final java.lang.String P_TEXT_ESCAPER
EscapingWriterFactory
.
When set, the factory will be used to create a per-writer
instance used to escape all textual content written, both
via explicit XMLStreamWriter.writeCharacters(java.lang.String)
methods,
and via copy methods (XMLStreamWriter2.copyEventFromReader(org.codehaus.stax2.XMLStreamReader2, boolean)
).
public static final java.lang.String P_ATTR_VALUE_ESCAPER
EscapingWriterFactory
.
When set, the factory will be used to create a per-writer
instance used to escape all attribute values written, both
via explicit XMLStreamWriter.writeAttribute(java.lang.String, java.lang.String)
methods,
and via copy methods (XMLStreamWriter2.copyEventFromReader(org.codehaus.stax2.XMLStreamReader2, boolean)
).
Constructor Detail |
---|
protected XMLOutputFactory2()
Method Detail |
---|
public abstract javax.xml.stream.XMLEventWriter createXMLEventWriter(java.io.Writer w, java.lang.String encoding) throws javax.xml.stream.XMLStreamException
javax.xml.stream.XMLStreamException
public abstract javax.xml.stream.XMLEventWriter createXMLEventWriter(javax.xml.stream.XMLStreamWriter sw) throws javax.xml.stream.XMLStreamException
javax.xml.stream.XMLStreamException
public abstract XMLStreamWriter2 createXMLStreamWriter(java.io.Writer w, java.lang.String encoding) throws javax.xml.stream.XMLStreamException
javax.xml.stream.XMLStreamException
public abstract void configureForXmlConformance()
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.
public abstract void configureForRobustness()
Like 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.
public abstract void configureForSpeed()
configureForXmlConformance()
(and configureForRobustness()
) enables.
None of currently defined standard properties should be affected.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |