public interface DOMOutput
Abstract Factory
DOMFactory
is used by DOMInput
and DOMOutput
for
creating Java objects and DOM elements.
Abstract Factory: DOMFactory
Client: DOMInput
, DOMOutput
.
Strategy
DOMFactory
is used by DOMInput
and DOMOutput
for
reading and writing objects.
Client: DOMInput
, DOMOutput
.
Strategy: DOMFactory
.
Modifier and Type | Method and Description |
---|---|
void |
addAttribute(java.lang.String name,
boolean value)
Adds an attribute to current element of the DOM Document.
|
void |
addAttribute(java.lang.String name,
boolean value,
boolean defaultValue)
Adds an attribute to current element of the DOM Document if it is
different from the default value.
|
void |
addAttribute(java.lang.String name,
double value)
Adds an attribute to current element of the DOM Document.
|
void |
addAttribute(java.lang.String name,
double value,
double defaultValue)
Adds an attribute to current element of the DOM Document if it is
different from the default value.
|
void |
addAttribute(java.lang.String name,
float value)
Adds an attribute to current element of the DOM Document.
|
void |
addAttribute(java.lang.String name,
float value,
float defaultValue)
Adds an attribute to current element of the DOM Document if it is
different from the default value.
|
void |
addAttribute(java.lang.String name,
int value)
Adds an attribute to current element of the DOM Document.
|
void |
addAttribute(java.lang.String name,
int value,
int defaultValue)
Adds an attribute to current element of the DOM Document if it is
different from the default value.
|
void |
addAttribute(java.lang.String name,
java.lang.String value)
Adds an attribute to current element of the DOM Document.
|
void |
addAttribute(java.lang.String name,
java.lang.String value,
java.lang.String defaultValue)
Adds an attribute to current element of the DOM Document if it is
different from the default value.
|
void |
addComment(java.lang.String comment)
Adds a comment to the current element of the DOM Document.
|
void |
addText(java.lang.String text)
Adds a text to current element of the DOM Document.
|
void |
closeElement()
Closes the current element of the DOM Document.
|
java.lang.Object |
getPrototype()
Returns a prototype for the object currently being written.
|
void |
openElement(java.lang.String tagName)
Adds a new element to the DOM Document and opens it.
|
void |
setDoctype(java.lang.String doctype)
Sets the doctype for the XML document.
|
void |
writeObject(java.lang.Object o)
Writes an object.
|
void setDoctype(java.lang.String doctype)
void openElement(java.lang.String tagName)
void closeElement()
java.lang.IllegalArgumentException
- if the provided tagName does
not match the tag name of the element.void addComment(java.lang.String comment)
void addText(java.lang.String text)
void addAttribute(java.lang.String name, java.lang.String value)
void addAttribute(java.lang.String name, java.lang.String value, java.lang.String defaultValue)
void addAttribute(java.lang.String name, int value)
void addAttribute(java.lang.String name, int value, int defaultValue)
void addAttribute(java.lang.String name, boolean value)
void addAttribute(java.lang.String name, boolean value, boolean defaultValue)
void addAttribute(java.lang.String name, float value)
void addAttribute(java.lang.String name, float value, float defaultValue)
void addAttribute(java.lang.String name, double value)
void addAttribute(java.lang.String name, double value, double defaultValue)
void writeObject(java.lang.Object o) throws java.io.IOException
java.io.IOException
java.lang.Object getPrototype()