|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.google.gdata.util.common.xml.XmlWriter.Element
protected static class XmlWriter.Element
The Element class contains information about an XML element. Used to keep
track of namespace alias/URI mappings. This class may be subclassed by
XmlWriter subclasses that want to track additional information about output
elements. The XmlWriter.createElement(String, String, String)
method can be
overridden to instantiate a specialized Element subclass.
Field Summary | |
---|---|
java.lang.String |
enclosingDefaultNamespace
The default namespace uri that will be active after closure of this element. |
boolean |
hasAttributes
True if the element has attributes. |
java.lang.String |
name
Local name of the element. |
static int |
NOT_REPEATING
Sentinel value used for repeating elements. |
java.lang.String |
nsAlias
Namespace prefix for the element. |
java.util.List<XmlNamespace> |
nsDecls
Namespace declarations associated with this element. |
java.lang.String |
nsUri
Full namespace uri for the element. |
boolean |
openTagEnded
Set to false if the closing bracket of the element's start
tag has been written (i.e. |
int |
repeatingCount
Indicates the number of repeating child elements written within the scope of the current XmlWriter.startRepeatingElement() /
XmlWriter.endRepeatingElement() pair for this element. |
int |
repeatingIndex
If an element is a part of a series of repeating element within its parent, this will contain the zero-based index of the child, else the value will be NOT_REPEATING . |
boolean |
unformattedChildren
True if this element contains unformatted children (text nodes, raw blobs of XML, or unescaped strings. |
java.lang.String |
xmlLang
xml:lang attribute of the element. |
Constructor Summary | |
---|---|
protected |
XmlWriter.Element(java.lang.String nsAlias,
java.lang.String nsUri,
java.lang.String name)
Constructs an element. |
Method Summary | |
---|---|
void |
addNamespace(XmlNamespace ns)
Adds a namespace declaration to the element, avoiding duplicates. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int NOT_REPEATING
repeatingCount
,
repeatingIndex
,
Constant Field Valuespublic java.util.List<XmlNamespace> nsDecls
public java.lang.String nsAlias
public final java.lang.String nsUri
public final java.lang.String name
public java.lang.String xmlLang
public boolean hasAttributes
public boolean unformattedChildren
public int repeatingCount
XmlWriter.startRepeatingElement()
/
XmlWriter.endRepeatingElement()
pair for this element. The value will be
NOT_REPEATING
if not currently writing repeating elements.
public int repeatingIndex
NOT_REPEATING
.
public java.lang.String enclosingDefaultNamespace
null
, indicates that the default namespace for
the enclosing scope is the same as for the element scope.
public boolean openTagEnded
false
if the closing bracket of the element's start
tag has been written (i.e. if XmlWriter.writeOpenTagEnd()
has been
called yet). Used to optimized elements that have no nested content
or children.
Constructor Detail |
---|
protected XmlWriter.Element(java.lang.String nsAlias, java.lang.String nsUri, java.lang.String name)
XmlWriter.createElement(String, String, String)
method to
create new elements.
Method Detail |
---|
public void addNamespace(XmlNamespace ns)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |