|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.saxon.om.AbstractNode
net.sf.saxon.tinytree.TinyNodeImpl
net.sf.saxon.tinytree.TinyParentNodeImpl
net.sf.saxon.tinytree.TinyElementImpl
final class TinyElementImpl
A node in the XML parse tree representing an XML element.
This class is an implementation of NodeInfo and also implements the DOM Element interface
Field Summary |
---|
Fields inherited from class net.sf.saxon.tinytree.TinyNodeImpl |
---|
document, nodeNr, parent |
Fields inherited from class net.sf.saxon.om.AbstractNode |
---|
NODE_LETTER |
Fields inherited from interface net.sf.saxon.om.NodeInfo |
---|
ALL_NAMESPACES, LOCAL_NAMESPACES, NO_NAMESPACES |
Constructor Summary | |
---|---|
TinyElementImpl(TinyDocumentImpl doc,
int nodeNr)
Constructor |
Method Summary | |
---|---|
void |
copy(Receiver receiver,
int whichNamespaces,
boolean copyAnnotations)
Copy this node to a given outputter |
void |
copyRUUD(Receiver receiver,
int whichNamespaces,
boolean copyAnnotations)
|
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 |
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 |
boolean |
hasAttributes()
Returns whether this node (if it is an element) has any attributes. |
void |
outputNamespaceNodes(Receiver out,
boolean includeAncestors)
Output all namespace nodes associated with this element. |
void |
setAttribute(String name,
String value)
Set the value of an attribute on the current element. |
Methods inherited from class net.sf.saxon.tinytree.TinyParentNodeImpl |
---|
getStringValue, hasChildNodes |
Methods inherited from class net.sf.saxon.tinytree.TinyNodeImpl |
---|
compareOrder, generateId, getDisplayName, getDocumentNumber, getDocumentRoot, getFingerprint, getLineNumber, getLocalPart, getNameCode, getNamePool, getOriginatingNode, getParent, getPrefix, getRoot, getSequenceNumber, getSystemId, getURI, isSameNode, iterateAxis, iterateAxis, setParentNode, setSystemId |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.w3c.dom.Element |
---|
getAttribute, getAttributeNode, getAttributeNodeNS, getAttributeNS, getElementsByTagName, getElementsByTagNameNS, getSchemaTypeInfo, getTagName, hasAttribute, hasAttributeNS, removeAttribute, removeAttributeNode, removeAttributeNS, setAttributeNode, setAttributeNodeNS, setAttributeNS, setIdAttribute, setIdAttributeNode, setIdAttributeNS |
Methods inherited from interface org.w3c.dom.Node |
---|
appendChild, cloneNode, compareDocumentPosition, getAttributes, getChildNodes, getFeature, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getTextContent, getUserData, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setNodeValue, setPrefix, setTextContent, setUserData |
Constructor Detail |
---|
public TinyElementImpl(TinyDocumentImpl doc, int nodeNr)
Method Detail |
---|
public final int getNodeKind()
getNodeKind
in interface NodeInfo
Type
public String getBaseURI()
getBaseURI
in interface NodeInfo
getBaseURI
in interface Node
getBaseURI
in class TinyNodeImpl
public int getTypeAnnotation()
getTypeAnnotation
in interface NodeInfo
getTypeAnnotation
in class AbstractNode
Type
public void outputNamespaceNodes(Receiver out, boolean includeAncestors) throws TransformerException
outputNamespaceNodes
in interface NodeInfo
outputNamespaceNodes
in class TinyNodeImpl
out
- The relevant outputterincludeAncestors
- True if namespaces associated with ancestor
elements must also be output; false if these are already known to be
on the result tree.
TransformerException
public boolean hasAttributes()
hasAttributes
in interface Node
hasAttributes
in class TinyNodeImpl
true
if this node has any attributes,
false
otherwise.public String getAttributeValue(int fingerprint)
getAttributeValue
in interface NodeInfo
getAttributeValue
in class TinyNodeImpl
fingerprint
- The fingerprint of the attribute name
public void setAttribute(String name, String value) throws DOMException
setAttribute
in interface Element
name
- The name of the attribute to be set. Any prefix is interpreted relative
to the namespaces defined for this element.value
- The new value of the attribute. Set this to null to remove the attribute.
DOMException
public void copy(Receiver receiver, int whichNamespaces, boolean copyAnnotations) throws TransformerException
copy
in interface NodeInfo
whichNamespaces
- indicates which namespaces should be copied: all, none,
or local (i.e., those not declared on a parent element)receiver
- the Receiver to which the node should be copiedcopyAnnotations
- indicates whether the type annotations
of element and attribute nodes should be copied
TransformerException
public void copyRUUD(Receiver receiver, int whichNamespaces, boolean copyAnnotations) throws TransformerException
TransformerException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |