|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.codehaus.stax2.ri.Stax2WriterImpl
com.ctc.wstx.sw.BaseStreamWriter
com.ctc.wstx.sw.TypedStreamWriter
com.ctc.wstx.sw.NonNsStreamWriter
public class NonNsStreamWriter
Implementation of XMLStreamWriter
used when namespace support
is not enabled. This means that only local names are used for elements
and attributes; and if rudimentary namespace declarations need to be
output, they are output using attribute writing methods.
Field Summary |
---|
Fields inherited from class com.ctc.wstx.sw.TypedStreamWriter |
---|
mValueEncoderFactory |
Fields inherited from class com.ctc.wstx.sw.BaseStreamWriter |
---|
ATTR_MIN_ARRAYCOPY, CHAR_SPACE, DEFAULT_COPYBUFFER_LEN, mAnyOutput, mCfgAutomaticEmptyElems, mCfgCDataAsText, mCfgCopyDefaultAttrs, mCheckAttrs, mCheckStructure, mConfig, mCopyBuffer, mDtdRootElem, mEmptyElement, mEncoding, MIN_ARRAYCOPY, mReturnNullForDefaultNamespace, mStartElementOpen, mState, mValidator, mVldContent, mVldProbHandler, mWriter, mXml11, STATE_EPILOG, STATE_PROLOG, STATE_TREE |
Fields inherited from interface com.ctc.wstx.cfg.OutputConfigFlags |
---|
CFG_ADD_SPACE_AFTER_EMPTY_ELEM, CFG_AUTO_CLOSE_OUTPUT, CFG_AUTOMATIC_EMPTY_ELEMENTS, CFG_AUTOMATIC_END_ELEMENTS, 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 |
Fields inherited from interface javax.xml.stream.XMLStreamConstants |
---|
ATTRIBUTE, CDATA, CHARACTERS, COMMENT, DTD, END_DOCUMENT, END_ELEMENT, ENTITY_DECLARATION, ENTITY_REFERENCE, NAMESPACE, NOTATION_DECLARATION, PROCESSING_INSTRUCTION, SPACE, START_DOCUMENT, START_ELEMENT |
Constructor Summary | |
---|---|
NonNsStreamWriter(XmlWriter xw,
String enc,
WriterConfig cfg)
|
Method Summary | |
---|---|
protected void |
closeStartElement(boolean emptyElem)
Method called to close an open start element, when another main-level element (not namespace declaration or attribute) is being output; except for end element which is handled differently. |
void |
copyStartElement(InputElementStack elemStack,
AttributeCollector attrCollector)
Element copier method implementation suitable to be used with non-namespace-aware writers. |
QName |
getCurrentElementName()
|
NamespaceContext |
getNamespaceContext()
|
String |
getNamespaceURI(String prefix)
|
String |
getPrefix(String uri)
|
protected String |
getTopElementDesc()
Method needed for error message generation |
void |
setDefaultNamespace(String uri)
|
void |
setNamespaceContext(NamespaceContext context)
|
void |
setPrefix(String prefix,
String uri)
|
String |
validateQNamePrefix(QName name)
Method called before writing a QName via Typed Access API. |
void |
writeAttribute(String localName,
String value)
|
void |
writeAttribute(String nsURI,
String localName,
String value)
|
void |
writeAttribute(String prefix,
String nsURI,
String localName,
String value)
|
void |
writeDefaultNamespace(String nsURI)
|
void |
writeEmptyElement(String localName)
|
void |
writeEmptyElement(String nsURI,
String localName)
|
void |
writeEmptyElement(String prefix,
String localName,
String nsURI)
|
void |
writeEndElement()
|
void |
writeEndElement(QName name)
Method called by XMLEventWriter implementation
(instead of the version
that takes no argument), so that we can verify it does match the
start element, if necessary |
void |
writeFullEndElement()
Similar to writeEndElement() , but never allows implicit
creation of empty elements. |
void |
writeNamespace(String prefix,
String nsURI)
|
void |
writeStartElement(StartElement elem)
Convenience method needed by XMLEventWriter
implementation, to use when
writing a start element, and possibly its attributes and namespace
declarations. |
void |
writeStartElement(String localName)
|
void |
writeStartElement(String nsURI,
String localName)
|
void |
writeStartElement(String prefix,
String localName,
String nsURI)
|
protected void |
writeTypedAttribute(String prefix,
String nsURI,
String localName,
org.codehaus.stax2.ri.typed.AsciiValueEncoder enc)
Method that will write attribute with value that is known not to require additional escaping. |
Methods inherited from class org.codehaus.stax2.ri.Stax2WriterImpl |
---|
copyStartElement |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public NonNsStreamWriter(XmlWriter xw, String enc, WriterConfig cfg)
Method Detail |
---|
public NamespaceContext getNamespaceContext()
getNamespaceContext
in interface XMLStreamWriter
getNamespaceContext
in class BaseStreamWriter
public String getPrefix(String uri)
getPrefix
in interface XMLStreamWriter
getPrefix
in class BaseStreamWriter
public void setDefaultNamespace(String uri) throws XMLStreamException
setDefaultNamespace
in interface XMLStreamWriter
setDefaultNamespace
in class BaseStreamWriter
XMLStreamException
public void setNamespaceContext(NamespaceContext context)
setNamespaceContext
in interface XMLStreamWriter
setNamespaceContext
in class BaseStreamWriter
public void setPrefix(String prefix, String uri) throws XMLStreamException
setPrefix
in interface XMLStreamWriter
setPrefix
in class BaseStreamWriter
XMLStreamException
public void writeAttribute(String localName, String value) throws XMLStreamException
writeAttribute
in interface XMLStreamWriter
writeAttribute
in class BaseStreamWriter
XMLStreamException
public void writeAttribute(String nsURI, String localName, String value) throws XMLStreamException
writeAttribute
in interface XMLStreamWriter
writeAttribute
in class BaseStreamWriter
XMLStreamException
public void writeAttribute(String prefix, String nsURI, String localName, String value) throws XMLStreamException
writeAttribute
in interface XMLStreamWriter
writeAttribute
in class BaseStreamWriter
XMLStreamException
public void writeDefaultNamespace(String nsURI) throws XMLStreamException
writeDefaultNamespace
in interface XMLStreamWriter
writeDefaultNamespace
in class BaseStreamWriter
XMLStreamException
public void writeEmptyElement(String localName) throws XMLStreamException
writeEmptyElement
in interface XMLStreamWriter
writeEmptyElement
in class BaseStreamWriter
XMLStreamException
public void writeEmptyElement(String nsURI, String localName) throws XMLStreamException
writeEmptyElement
in interface XMLStreamWriter
writeEmptyElement
in class BaseStreamWriter
XMLStreamException
public void writeEmptyElement(String prefix, String localName, String nsURI) throws XMLStreamException
writeEmptyElement
in interface XMLStreamWriter
writeEmptyElement
in class BaseStreamWriter
XMLStreamException
public void writeEndElement() throws XMLStreamException
writeEndElement
in interface XMLStreamWriter
writeEndElement
in class BaseStreamWriter
XMLStreamException
public void writeNamespace(String prefix, String nsURI) throws XMLStreamException
writeNamespace
in interface XMLStreamWriter
writeNamespace
in class BaseStreamWriter
XMLStreamException
public void writeStartElement(String localName) throws XMLStreamException
writeStartElement
in interface XMLStreamWriter
writeStartElement
in class BaseStreamWriter
XMLStreamException
public void writeStartElement(String nsURI, String localName) throws XMLStreamException
writeStartElement
in interface XMLStreamWriter
writeStartElement
in class BaseStreamWriter
XMLStreamException
public void writeStartElement(String prefix, String localName, String nsURI) throws XMLStreamException
writeStartElement
in interface XMLStreamWriter
writeStartElement
in class BaseStreamWriter
XMLStreamException
public void writeFullEndElement() throws XMLStreamException
writeEndElement()
, but never allows implicit
creation of empty elements.
writeFullEndElement
in interface org.codehaus.stax2.XMLStreamWriter2
writeFullEndElement
in class BaseStreamWriter
XMLStreamException
public QName getCurrentElementName()
getCurrentElementName
in interface org.codehaus.stax2.validation.ValidationContext
getCurrentElementName
in class BaseStreamWriter
public String getNamespaceURI(String prefix)
getNamespaceURI
in interface org.codehaus.stax2.validation.ValidationContext
getNamespaceURI
in class BaseStreamWriter
public void writeStartElement(StartElement elem) throws XMLStreamException
BaseStreamWriter
XMLEventWriter
implementation, to use when
writing a start element, and possibly its attributes and namespace
declarations.
writeStartElement
in class BaseStreamWriter
XMLStreamException
public void writeEndElement(QName name) throws XMLStreamException
XMLEventWriter
implementation
(instead of the version
that takes no argument), so that we can verify it does match the
start element, if necessary
writeEndElement
in class BaseStreamWriter
XMLStreamException
protected void writeTypedAttribute(String prefix, String nsURI, String localName, org.codehaus.stax2.ri.typed.AsciiValueEncoder enc) throws XMLStreamException
TypedStreamWriter
writeTypedAttribute
in class TypedStreamWriter
XMLStreamException
protected void closeStartElement(boolean emptyElem) throws XMLStreamException
closeStartElement
in class BaseStreamWriter
XMLStreamException
public void copyStartElement(InputElementStack elemStack, AttributeCollector attrCollector) throws IOException, XMLStreamException
copyStartElement
in class BaseStreamWriter
IOException
XMLStreamException
protected String getTopElementDesc()
BaseStreamWriter
getTopElementDesc
in class BaseStreamWriter
public String validateQNamePrefix(QName name)
BaseStreamWriter
validateQNamePrefix
in class BaseStreamWriter
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |