public class ElementWriter extends AbstractMessageWriter
Constructor and Description |
---|
ElementWriter(OutputStream os,
String name,
String namespace) |
ElementWriter(XMLStreamWriter writer)
Create an ElementWriter but without writing an element name.
|
ElementWriter(XMLStreamWriter streamWriter,
QName name) |
ElementWriter(XMLStreamWriter writer,
String name,
String namespace) |
ElementWriter(XMLStreamWriter writer,
String name,
String namespace,
String prefix) |
Modifier and Type | Method and Description |
---|---|
void |
close()
Tells the MessageWriter that writing operations are completed so it can
write the end element.
|
void |
flush() |
MessageWriter |
getAttributeWriter(QName qname) |
MessageWriter |
getAttributeWriter(String nm) |
MessageWriter |
getAttributeWriter(String nm,
String ns) |
MessageWriter |
getElementWriter(QName qname) |
MessageWriter |
getElementWriter(String nm) |
MessageWriter |
getElementWriter(String nm,
String ns) |
String |
getNamespace() |
String |
getPrefixForNamespace(String ns) |
String |
getPrefixForNamespace(String ns,
String hint)
Get a prefix for a namespace.
|
XMLStreamWriter |
getXMLStreamWriter() |
void |
writeValue(Object value) |
writeValueAsBoolean, writeValueAsByte, writeValueAsCharacter, writeValueAsDouble, writeValueAsFloat, writeValueAsInt, writeValueAsLong, writeValueAsShort, writeXsiNil, writeXsiType
public ElementWriter(XMLStreamWriter writer)
writer
- public ElementWriter(XMLStreamWriter writer, String name, String namespace)
public ElementWriter(XMLStreamWriter streamWriter, QName name)
public ElementWriter(XMLStreamWriter writer, String name, String namespace, String prefix)
public ElementWriter(OutputStream os, String name, String namespace) throws XMLStreamException
os
- XMLStreamException
public void writeValue(Object value)
public MessageWriter getElementWriter(String nm)
org.apache.cxf.aegis.xml.MessageWriter#getWriter(java.lang.String)
public MessageWriter getElementWriter(String nm, String ns)
public MessageWriter getElementWriter(QName qname)
public String getNamespace()
public void close()
MessageWriter
public void flush() throws XMLStreamException
XMLStreamException
public XMLStreamWriter getXMLStreamWriter()
public MessageWriter getAttributeWriter(String nm)
public MessageWriter getAttributeWriter(String nm, String ns)
public MessageWriter getAttributeWriter(QName qname)
public String getPrefixForNamespace(String ns, String hint)
MessageWriter
ns
- the namespace to retrieve the prefix forhint
- the hint for the prefix.Apache CXF