protected static class XmlWriter.Element
extends java.lang.Object
XmlWriter.createElement(String, String, String)
method can be
overridden to instantiate a specialized Element subclass.Modifier and Type | Field and Description |
---|---|
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.
|
Modifier | Constructor and Description |
---|---|
protected |
XmlWriter.Element(java.lang.String nsAlias,
java.lang.String nsUri,
java.lang.String name)
Constructs an element.
|
Modifier and Type | Method and Description |
---|---|
void |
addNamespace(XmlNamespace ns)
Adds a namespace declaration to the element, avoiding duplicates.
|
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.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.public void addNamespace(XmlNamespace ns)