|
J avolution v5.2 (J2SE 1.5+) | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjavolution.xml.XMLFormat.OutputElement
public static final class XMLFormat.OutputElement
This class represents an output XML element (marshalling).
| Method Summary | ||
|---|---|---|
void |
add(java.lang.Object obj)
Adds the specified object or null as an anonymous
nested element of unknown type. |
|
void |
add(java.lang.Object obj,
java.lang.String name)
Adds the specified object as a named nested element of unknown type ( null objects are ignored). |
|
void |
add(java.lang.Object obj,
java.lang.String localName,
java.lang.String uri)
Adds the specified object as a fully qualified nested element of unknown type ( null objects are ignored). |
|
|
add(T obj,
java.lang.String name,
java.lang.Class<T> cls)
Adds the specified object as a named nested element of specified actual type ( null objects are ignored). |
|
|
add(T obj,
java.lang.String localName,
java.lang.String uri,
java.lang.Class<T> cls)
Adds the specified object as a fully qualified nested element of specified actual type ( null objects are ignored). |
|
void |
addText(java.lang.CharSequence text)
Adds the content of a text-only element (equivalent to getStreamWriter().writeCharacters(text)). |
|
void |
addText(java.lang.String text)
Equivalent to addText(CharSequence)
(for J2ME compatibility). |
|
XMLStreamWriter |
getStreamWriter()
Returns the StAX-like stream writer (provides complete control over the marshalling process). |
|
void |
setAttribute(java.lang.String name,
boolean value)
Sets the specified boolean attribute. |
|
void |
setAttribute(java.lang.String name,
char value)
Sets the specified char attribute. |
|
void |
setAttribute(java.lang.String name,
java.lang.CharSequence value)
Sets the specified CharSequence attribute
(null values are ignored). |
|
void |
setAttribute(java.lang.String name,
double value)
Sets the specified double attribute. |
|
void |
setAttribute(java.lang.String name,
float value)
Sets the specified float attribute. |
|
void |
setAttribute(java.lang.String name,
int value)
Sets the specified int attribute. |
|
void |
setAttribute(java.lang.String name,
long value)
Sets the specified long attribute. |
|
void |
setAttribute(java.lang.String name,
java.lang.Object value)
Sets the specified attribute using its associated TextFormat. |
|
void |
setAttribute(java.lang.String name,
java.lang.String value)
Sets the specified String attribute
(null values are ignored). |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public XMLStreamWriter getStreamWriter()
public void add(java.lang.Object obj)
throws XMLStreamException
null as an anonymous
nested element of unknown type.
obj - the object added as nested element or null.
XMLStreamException
public void add(java.lang.Object obj,
java.lang.String name)
throws XMLStreamException
null objects are ignored).
The nested XML element contains a class attribute identifying
the object type.
obj - the object added as nested element or null.name - the name of the nested element.
XMLStreamException
public void add(java.lang.Object obj,
java.lang.String localName,
java.lang.String uri)
throws XMLStreamException
null objects are ignored).
The nested XML element contains a class attribute identifying
the object type.
obj - the object added as nested element or null.localName - the local name of the nested element.uri - the namespace URI of the nested element.
XMLStreamException
public <T> void add(T obj,
java.lang.String name,
java.lang.Class<T> cls)
throws XMLStreamException
null objects are ignored).
The nested XML element does not contain any class attribute.
obj - the object added as nested element or null.name - the name of the nested element.cls - the class identifying the format of the specified object.
XMLStreamException
public <T> void add(T obj,
java.lang.String localName,
java.lang.String uri,
java.lang.Class<T> cls)
throws XMLStreamException
null objects are ignored).
The nested XML element does not contain any class attribute.
obj - the object added as nested element or null.localName - the local name of the nested element.uri - the namespace URI of the nested element.cls - the class identifying the format of the specified object.
XMLStreamException
public void addText(java.lang.CharSequence text)
throws XMLStreamException
getStreamWriter().writeCharacters(text)).
text - the element text content or an empty sequence if none.
XMLStreamException
public void addText(java.lang.String text)
throws XMLStreamException
addText(CharSequence)
(for J2ME compatibility).
text - the element text content or an empty sequence if none.
XMLStreamException
public void setAttribute(java.lang.String name,
java.lang.CharSequence value)
throws XMLStreamException
CharSequence attribute
(null values are ignored).
name - the attribute name.value - the attribute value or null.
XMLStreamException
public void setAttribute(java.lang.String name,
java.lang.String value)
throws XMLStreamException
String attribute
(null values are ignored).
name - the attribute name.value - the attribute value.
XMLStreamException
public void setAttribute(java.lang.String name,
boolean value)
throws XMLStreamException
boolean attribute.
name - the attribute name.value - the boolean value for the specified attribute.
XMLStreamException
public void setAttribute(java.lang.String name,
char value)
throws XMLStreamException
char attribute.
name - the attribute name.value - the char value for the specified attribute.
XMLStreamException
public void setAttribute(java.lang.String name,
int value)
throws XMLStreamException
int attribute.
name - the attribute name.value - the int value for the specified attribute.
XMLStreamException
public void setAttribute(java.lang.String name,
long value)
throws XMLStreamException
long attribute.
name - the attribute name.value - the long value for the specified attribute.
XMLStreamException
public void setAttribute(java.lang.String name,
float value)
throws XMLStreamException
float attribute.
name - the attribute name.value - the float value for the specified attribute.
/
XMLStreamException
public void setAttribute(java.lang.String name,
double value)
throws XMLStreamException
double attribute.
name - the attribute name.value - the double value for the specified attribute.
/
XMLStreamException
public void setAttribute(java.lang.String name,
java.lang.Object value)
throws XMLStreamException
TextFormat.
name - the name of the attribute.value - the Boolean value for the specified attribute
or null in which case the attribute is not set.
XMLStreamException
|
J avolution v5.2 (J2SE 1.5+) | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||