public abstract class SMElementInfo extends Object
SMInputCursor
. Note that all information is actually optional
for implementations; some implementations may want to minimize
memory usage and store only some of properties that are accessible
via base API. The reason for including "full" set of properties is
convenience; there is no need to upcast as the base class has
necesary accessors.Constructor and Description |
---|
SMElementInfo() |
Modifier and Type | Method and Description |
---|---|
abstract int |
getDepth()
Optional operation that will return number of parent start elements
this element has, if any.
|
abstract 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.
|
abstract 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.
|
abstract 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.
|
abstract 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.
|
abstract 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).
|
abstract String |
getPrefix()
Optional operation that will return the prefix
of the element, if it had one and namespace support was enabled
for the parser.
|
abstract SMElementInfo |
getPreviousSibling()
Optional operation that will return information about the previous
sibling in the sibling element chain.
|
boolean |
isFirstChild() |
boolean |
isRoot() |
public abstract SMElementInfo getParent()
public abstract SMElementInfo getPreviousSibling()
public boolean isRoot()
public boolean isFirstChild()
public abstract int getNodeIndex()
public abstract int getElementIndex()
Note that the element indices for consequtive elements stored may not be consequtive, if the iterator filtered out some elements.
public abstract int getDepth()
public abstract String getNamespaceURI()
public abstract String getLocalName()
public abstract String getPrefix()
Copyright © 2013 FasterXML. All Rights Reserved.