|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.google.gdata.wireformats.XmlGenerator.XmlElementGenerator
public static class XmlGenerator.XmlElementGenerator
The XmlElementGenerator class provides the default implementation of the
interface. It will generate start and end
elements based directly on the element metadata, attributes, and value.
| Constructor Summary | |
|---|---|
XmlGenerator.XmlElementGenerator()
|
|
| Method Summary | |
|---|---|
void |
endElement(XmlWriter xw,
Element e,
ElementMetadata<?,?> metadata)
End an element, writing a close tag if needed. |
protected java.util.List<XmlWriter.Attribute> |
getAttributes(Element e,
ElementMetadata<?,?> metadata)
Get a list of attributes for the given element. |
protected QName |
getName(Element e,
ElementMetadata<?,?> metadata)
Returns the QName of an element, possibly using the given metadata for the name if it is not null. |
protected java.util.Collection<XmlNamespace> |
getNamespaces(Element parent,
Element e,
ElementMetadata<?,?> metadata)
Get a collection of namespaces for the current element and parent. |
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public XmlGenerator.XmlElementGenerator()
| Method Detail |
|---|
public boolean startElement(XmlWriter xw,
Element parent,
Element e,
ElementMetadata<?,?> metadata)
throws java.io.IOException
XmlGenerator.ElementGeneratorfalse to indicate that textContent
and child elements should not be added.
startElement in interface XmlGenerator.ElementGeneratorxw - the xml writer to write to.parent - the parent element.e - the element to start.metadata - the metadata for the element
java.io.IOException - if an error occurs while writing to the writer.
protected QName getName(Element e,
ElementMetadata<?,?> metadata)
null.
protected java.util.Collection<XmlNamespace> getNamespaces(Element parent,
Element e,
ElementMetadata<?,?> metadata)
protected java.util.List<XmlWriter.Attribute> getAttributes(Element e,
ElementMetadata<?,?> metadata)
public void textContent(XmlWriter xw,
Element e,
ElementMetadata<?,?> metadata)
throws java.io.IOException
XmlGenerator.ElementGenerator
textContent in interface XmlGenerator.ElementGeneratorjava.io.IOException
public void endElement(XmlWriter xw,
Element e,
ElementMetadata<?,?> metadata)
throws java.io.IOException
XmlGenerator.ElementGenerator
endElement in interface XmlGenerator.ElementGeneratorjava.io.IOException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||