public class XMLUTF8OutputterWriter extends Object implements XMLOutputter
| Constructor and Description |
|---|
XMLUTF8OutputterWriter(OutputStream outputStream) |
XMLUTF8OutputterWriter(OutputStream outputStream,
boolean withXMLDeclaration) |
| Modifier and Type | Method and Description |
|---|---|
void |
addAttribute(String name,
String value)
Adds an attribute of type string to the current XML tag.
|
void |
addBigIntegerAttribute(String name,
BigInteger value)
Adds an attribute of type big integer to the current XML tag.
|
void |
addBooleanAttribute(String name,
boolean value)
Adds an attribute of type boolean to the current XML tag.
|
void |
addCharacterData(Reader readerData)
Adds character data for the current XML tag.
|
void |
addCharacterData(String data)
Adds character data for the current XML tag.
|
void |
addComment(String... lines) |
void |
addDateAttribute(String name,
Date value)
Adds an attribute of type date to the current XML tag;
Dates are encoded using ISO 8601 format, that is:
'YYYY-MM-DD'.
|
void |
addDateTimeAttribute(String name,
Date value)
Adds an attribute of type date and time to the current XML tag;
Date and times are encoded using ISO 8601 format, that is:
'YYYY-MM-DDTHH:MM:SS.mmm'.
|
void |
addDecimalAttribute(String name,
BigDecimal value)
Adds an attribute of type decimal to the current XML tag.
|
void |
addIntegerAttribute(String name,
Integer value)
Adds an attribute of type integer to the current XML tag.
|
void |
addLongAttribute(String name,
Long value)
Adds an attribute of type long to the current XML tag.
|
void |
endTag(String tag)
Ends the XML tag.
|
void |
flush() |
void |
marshal(String tagName,
IXMLMarshallable child)
Marshals a node into this writer.
|
void |
setIndent(boolean indent)
Sets to false if the result cannot be indented otherwise set to true.
|
void |
startTag(String tag)
Starts a XML tag.
|
public XMLUTF8OutputterWriter(OutputStream outputStream)
public XMLUTF8OutputterWriter(OutputStream outputStream, boolean withXMLDeclaration)
public void setIndent(boolean indent)
indent - Sets to false if the result cannot be indented otherwise set to truepublic void marshal(String tagName, IXMLMarshallable child)
XMLOutputterThe sequence is:
IXMLMarshallable.marshalAttributes(XMLOutputter)IXMLMarshallable.marshalChildren(XMLOutputter)
Note
This method is taking care of handling a null child.
marshal in interface XMLOutputtertagName - The name of child XML tagchild - The child itself, that must be marshalledpublic void startTag(String tag)
XMLOutputterstartTag in interface XMLOutputtertag - The name of the XML tag to start withpublic void addAttribute(String name, String value)
XMLOutputteraddAttribute in interface XMLOutputtername - The name of the attributevalue - The text value of the attributepublic void addDecimalAttribute(String name, BigDecimal value)
XMLOutputteraddDecimalAttribute in interface XMLOutputtername - The name of the attributevalue - The numerical value of the attributepublic void addDateTimeAttribute(String name, Date value)
XMLOutputteraddDateTimeAttribute in interface XMLOutputtername - The name of the attributevalue - The value of the attributepublic void addDateAttribute(String name, Date value)
XMLOutputteraddDateAttribute in interface XMLOutputtername - The name of the attributevalue - The date value of the attributepublic void addBooleanAttribute(String name, boolean value)
XMLOutputteraddBooleanAttribute in interface XMLOutputtername - The name of the attributevalue - The value of the attributepublic void addCharacterData(String data)
XMLOutputteraddCharacterData in interface XMLOutputterdata - The character data to add for the current tagpublic void addCharacterData(Reader readerData)
XMLOutputteraddCharacterData in interface XMLOutputterreaderData - The character data to add for the current tag as a Readerpublic void addComment(String... lines)
public void endTag(String tag)
XMLOutputterendTag in interface XMLOutputtertag - The name of the XML tag to closepublic void addIntegerAttribute(String name, Integer value)
XMLOutputteraddIntegerAttribute in interface XMLOutputtername - The name of the attributevalue - The integer value of the attributepublic void addLongAttribute(String name, Long value)
XMLOutputteraddLongAttribute in interface XMLOutputtername - The name of the attributevalue - The value of the attributepublic void addBigIntegerAttribute(String name, BigInteger value)
XMLOutputteraddBigIntegerAttribute in interface XMLOutputtername - The name of the attributevalue - The value of the attributepublic void flush()
throws IOException
IOException