public interface XMLMarshallable
Java interface serves as a base for objects that can be marshalled and unmarshalled; Consider the
Java subinterfaces and the Java classes that implement this interface.
The methods provided by this interface, define the processes of marshalling content trees
into XML documents and vice-versa.
The XML APIs specify the following XSD fragment:
XSD Fragment
<xs:complexType name="XMLMarshallable" abstract="true"/>
| Modifier and Type | Method and Description |
|---|---|
void |
addCharacterData(java.lang.String cData)
Adds character data to the content element.
|
void |
addChild(java.lang.String tagName,
XMLMarshallable child)
Adds a child to the object, the
child representing
the marshallable object which must be added to the element. |
void |
marshal(XMLOutputter output)
Gives an XML representation of this object, including its children.
|
void |
setAttributes(XMLAttributes atts)
Sets the attributes of the XML representation of the element being
processed.
|
void setAttributes(XMLAttributes atts)
atts - The XML attributes of the current elementvoid addChild(java.lang.String tagName,
XMLMarshallable child)
child representing
the marshallable object which must be added to the element.tagName - The name of tag for the childchild - The child to be addedvoid addCharacterData(java.lang.String cData)
cData - The character data to be addedvoid marshal(XMLOutputter output)
output - The XML output to marshal the object into