public class DefaultElementInfo extends SMElementInfo
SMElementInfo
; fully implements
all accessors by storing information necessary.Constructor and Description |
---|
DefaultElementInfo(SMElementInfo parent,
SMElementInfo prevSibling,
String prefix,
String nsURI,
String localName,
int nodeIndex,
int elemIndex,
int depth) |
Modifier and Type | Method and Description |
---|---|
int |
getDepth()
Optional operation that will return number of parent start elements
this element has, if any.
|
int |
getElementIndex()
Optional operation that will return the zero-based index of the element
amongst all (start) elements iterated over by the iterator that created
this element info object.
|
String |
getLocalName()
Optional operation that will return the local name
of the element, or, if namespace support was not enabled for
the parser, full name including possible namespace prefix.
|
String |
getNamespaceURI()
Optional operation that will return the URI of the namespace
of the element; this will be empty String ("") for the default
namespace (if none declared), or if namespace support was not
enabled for the parser.
|
int |
getNodeIndex()
Optional operation that will return the zero-based index of the element
node amongst all nodes iterated over by the iterator that created
this element info object.
|
SMElementInfo |
getParent()
Optional operation that will return information about the parent
element of this element, if one exists; null if not (case for the
root element).
|
String |
getPrefix()
Optional operation that will return the prefix
of the element, if it had one and namespace support was enabled
for the parser.
|
SMElementInfo |
getPreviousSibling()
Optional operation that will return information about the previous
sibling in the sibling element chain.
|
isFirstChild, isRoot
public DefaultElementInfo(SMElementInfo parent, SMElementInfo prevSibling, String prefix, String nsURI, String localName, int nodeIndex, int elemIndex, int depth) throws XMLStreamException
XMLStreamException
public SMElementInfo getParent()
SMElementInfo
getParent
in class SMElementInfo
public SMElementInfo getPreviousSibling()
SMElementInfo
getPreviousSibling
in class SMElementInfo
public int getNodeIndex()
SMElementInfo
getNodeIndex
in class SMElementInfo
public int getElementIndex()
SMElementInfo
Note that the element indices for consequtive elements stored may not be consequtive, if the iterator filtered out some elements.
getElementIndex
in class SMElementInfo
public int getDepth()
SMElementInfo
getDepth
in class SMElementInfo
public String getNamespaceURI()
SMElementInfo
getNamespaceURI
in class SMElementInfo
public String getLocalName()
SMElementInfo
getLocalName
in class SMElementInfo
public String getPrefix()
SMElementInfo
getPrefix
in class SMElementInfo
Copyright © 2013 FasterXML. All Rights Reserved.