| com.google.gdata.wireformats.XmlGenerator.ElementGenerator |
Known Indirect Subclasses
|
Class Overview
The ElementGenerator interface is implemented by helper classes that
will generate the start element, text content, and end element syntax
for an Element to an XmlWriter.
The generic implementation of this interface is provided by the
XmlGenerator.XmlElementGenerator class, but it may be overridden by element
types that want to take more direct control over XML output for a given
element.
Summary
| Public Methods |
|
abstract
void
|
endElement(XmlWriter xw, Element e, ElementMetadata<?, ?> metadata)
End an element, writing a close tag if needed.
|
|
abstract
boolean
|
startElement(XmlWriter xw, Element parent, Element e, ElementMetadata<?, ?> metadata)
Start an element.
|
|
abstract
void
|
textContent(XmlWriter xw, Element e, ElementMetadata<?, ?> metadata)
Write the text content for an element.
|
Public Methods
End an element, writing a close tag if needed.
Start an element. If an ElementGenerator instances writes a full
element tag, it should return false to indicate that textContent
and child elements should not be added.
Parameters
| xw
| The xml writer to write to. |
| parent
| The parent element. |
| e
| The element to start. |
| metadata
| The metadata for the element |
Returns
- true if child elements should be written, false if the element
was fully written.
Throws
| IOException
| if an error occurs while writing to the writer.
|
Write the text content for an element.