public static interface XmlGenerator.ElementGenerator
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.
Modifier and Type | Method and Description |
---|---|
void |
endElement(XmlWriter xw,
Element e,
ElementMetadata<?,?> metadata)
End an element, writing a close tag if needed.
|
boolean |
startElement(XmlWriter xw,
Element parent,
Element e,
ElementMetadata<?,?> metadata)
Start an element.
|
void |
textContent(XmlWriter xw,
Element e,
ElementMetadata<?,?> metadata)
Write the text content for an element.
|
boolean startElement(XmlWriter xw, Element parent, Element e, ElementMetadata<?,?> metadata) throws java.io.IOException
false
to indicate that textContent
and child elements should not be added.xw
- the xml writer to write to.parent
- the parent element.e
- the element to start.metadata
- the metadata for the elementjava.io.IOException
- if an error occurs while writing to the writer.void textContent(XmlWriter xw, Element e, ElementMetadata<?,?> metadata) throws java.io.IOException
java.io.IOException
void endElement(XmlWriter xw, Element e, ElementMetadata<?,?> metadata) throws java.io.IOException
java.io.IOException