public class XmlWriter extends Object
Constructor and Description |
---|
XmlWriter(Writer w)
Creates a new XMLWriter, ready to write an XML document to the specified
writer.
|
XmlWriter(Writer w,
String xmlns)
Creates a new XMLWriter, ready to write an XML document to the specified
writer.
|
Modifier and Type | Method and Description |
---|---|
XmlWriter |
endElement()
Closes the last opened element at the current position in the in-progress
XML document.
|
XmlWriter |
startElement(String element)
Starts a new element with the specified name at the current position in
the in-progress XML document.
|
XmlWriter |
value(ByteBuffer b)
Adds the specified value as Base64 encoded text to the current position of the in
progress XML document.
|
XmlWriter |
value(Date date)
Adds the specified date as text to the current position of the
in-progress XML document.
|
XmlWriter |
value(Object obj)
Adds the string representation of the specified object to the current
position of the in progress XML document.
|
XmlWriter |
value(String s)
Adds the specified value as text to the current position of the in
progress XML document.
|
public XmlWriter(Writer w)
w
- The writer this XMLWriter will write to.public XmlWriter(Writer w, String xmlns)
w
- The writer this XMLWriter will write to.xmlns
- The XML namespace to include in the xmlns attribute of the
root element.public XmlWriter startElement(String element)
element
- The name of the new element.public XmlWriter endElement()
public XmlWriter value(String s)
s
- The text to add to the XML document.public XmlWriter value(ByteBuffer b)
b
- The binary data to add to the XML document.public XmlWriter value(Date date)
date
- The date to add to the XML document.public XmlWriter value(Object obj)
obj
- The object to translate to a string and add to the XML
document.Copyright © 2017 Amazon Web Services, Inc. All Rights Reserved.