|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
ObjectNodeImpl
ParentNodeImpl
ElementImpl
public class ElementImpl
A node in the XML parse tree representing an XML element.
This class is an implementation of NodeInfo. The object is a wrapper around one entry in the arrays maintained by the LazyTree. Note that the same node might be represented by different LazyElementImpl objects at different times.
| Field Summary | |
|---|---|
(package private) int[] |
attrNames
|
(package private) String[] |
attrValues
|
(package private) int |
nameSpace
|
| Fields inherited from class ParentNodeImpl |
|---|
childNum |
| Fields inherited from class NodeImpl |
|---|
document, nameCode, nextSibNum, NODE_LETTER, nodeNum, parentNum, prevSibNum |
| Fields inherited from interface NodeInfo |
|---|
ALL_NAMESPACES, EMPTY_NAMESPACE_LIST, IS_DTD_TYPE, IS_NILLED, LOCAL_NAMESPACES, NO_NAMESPACES |
| Fields inherited from interface ValueRepresentation |
|---|
EMPTY_VALUE_ARRAY |
| Constructor Summary | |
|---|---|
ElementImpl()
|
|
| Method Summary | |
|---|---|
void |
copy(Receiver out,
int whichNamespaces,
boolean copyAnnotations,
int locationId)
Copy this node to a given receiver |
String |
getAttributeValue(int fingerprint)
Get the value of a given attribute of this node |
String |
getBaseURI()
Get the base URI of this element node. |
int[] |
getDeclaredNamespaces(int[] buffer)
Get all namespace undeclarations and undeclarations defined on this element. |
(package private) static int[] |
getDeclaredNamespaces(LazyDocument doc,
int nodeNr,
int nameSpace,
int[] buffer)
Static method to get all namespace undeclarations and undeclarations defined on a given element, without instantiating the node object. |
int |
getNodeKind()
Return the type of node. |
int |
getTypeAnnotation()
Get the type annotation of this node, if any Returns Type.UNTYPED_ANY if there is no type annotation |
void |
init(int attrOffset,
int nameSpace)
Optional initialization function, depends on derived class |
void |
sendNamespaceDeclarations(Receiver out,
boolean includeAncestors)
Output all namespace nodes associated with this element. |
| Methods inherited from class ParentNodeImpl |
|---|
enumerateChildren, getFirstChild, getLastChild, getStringValue, getStringValueCS, hasChildNodes, iterateAxis, iterateAxis |
| Methods inherited from class Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
int nameSpace
int[] attrNames
String[] attrValues
| Constructor Detail |
|---|
public ElementImpl()
| Method Detail |
|---|
public void init(int attrOffset,
int nameSpace)
throws IOException
NodeImpl
init in class NodeImplIOExceptionpublic final int getNodeKind()
public String getBaseURI()
getBaseURI in interface NodeInfogetBaseURI in class NodeImplpublic int getTypeAnnotation()
getTypeAnnotation in interface NodeInfogetTypeAnnotation in class NodeImpl
public void sendNamespaceDeclarations(Receiver out,
boolean includeAncestors)
throws XPathException
sendNamespaceDeclarations in interface NodeInfosendNamespaceDeclarations in class NodeImplout - The relevant outputterincludeAncestors - True if namespaces associated with ancestor
XPathExceptionpublic int[] getDeclaredNamespaces(int[] buffer)
getDeclaredNamespaces in interface NodeInfogetDeclaredNamespaces in class NodeImplbuffer - If this is non-null, and the result array fits in this buffer, then the result
may overwrite the contents of this array, to avoid the cost of allocating a new array on the heap.
For a node other than an element, the method returns null.
static int[] getDeclaredNamespaces(LazyDocument doc,
int nodeNr,
int nameSpace,
int[] buffer)
doc - The lazy document containing the given element nodenodeNr - The node number of the given element node within the tinyTreebuffer - If this is non-null, and the result array fits in this buffer, then the result
may overwrite the contents of this array, to avoid the cost of allocating a new array on the heap.
For a node other than an element, the method returns null.
public String getAttributeValue(int fingerprint)
getAttributeValue in interface NodeInfogetAttributeValue in class NodeImplfingerprint - The fingerprint of the attribute name
public void copy(Receiver out,
int whichNamespaces,
boolean copyAnnotations,
int locationId)
throws XPathException
whichNamespaces - indicates which namespaces should be copied: all, none,
or local (i.e., those not declared on a parent element)
XPathException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||