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, isRootpublic DefaultElementInfo(SMElementInfo parent, SMElementInfo prevSibling, String prefix, String nsURI, String localName, int nodeIndex, int elemIndex, int depth) throws XMLStreamException
XMLStreamExceptionpublic SMElementInfo getParent()
SMElementInfogetParent in class SMElementInfopublic SMElementInfo getPreviousSibling()
SMElementInfogetPreviousSibling in class SMElementInfopublic int getNodeIndex()
SMElementInfogetNodeIndex in class SMElementInfopublic int getElementIndex()
SMElementInfoNote that the element indices for consequtive elements stored may not be consequtive, if the iterator filtered out some elements.
getElementIndex in class SMElementInfopublic int getDepth()
SMElementInfogetDepth in class SMElementInfopublic String getNamespaceURI()
SMElementInfogetNamespaceURI in class SMElementInfopublic String getLocalName()
SMElementInfogetLocalName in class SMElementInfopublic String getPrefix()
SMElementInfogetPrefix in class SMElementInfoCopyright © 2021 FasterXML. All rights reserved.