com.jclark.xsl.om

Interface Node

All Superinterfaces:
SourceLocator
Known Implementing Classes:
AttributeNode, CommentNode, ContainerNode, ElementNode, NodeBase, ProcessingInstructionNode, RootNode, TextNode

public interface Node
extends SourceLocator

represents a Node in an XML document

Field Summary

static byte
ALLTYPES
static byte
ATTRIBUTE
static byte
COMMENT
static byte
ELEMENT
static int
N_TYPES
static byte
PROCESSING_INSTRUCTION
static byte
ROOT
static byte
TEXT

Method Summary

int
compareTo(Node node)
also compares document order
Node
getAttribute(Name name)
does this only work on Elements?
String
getAttributeValue(Name name)
does this only work on Elements?
SafeNodeIterator
getAttributes()
does this only work on Elements?
SafeNodeIterator
getChildren()
as the name implies ...
String
getData()
Returns text for TEXT node; value for attribute node; content for comment node; content after PI for PI node;
Node
getElementWithId(String id)
finds an Element Node, in the this node's document, with the given ID
SafeNodeIterator
getFollowingSiblings()
as the name implies ...
String
getGeneratedId()
guaranteed to be unique (and repeatable)
int
getLineNumber()
if decorated with locator events, this returns the line number in the XML source where this node was found
Name
getName()
Returns element type name for element; attribute name for an attribute; target for a PI.
NamespacePrefixMap
getNamespacePrefixMap()
in-scope namespaces ??
Node
getParent()
as the name implies ...
Node
getRoot()
gets the owning Document's root
byte
getType()
returns one of: ELEMENT, TEXT, ATTRIBUTE, ROOT, PROCESSING_INSTRUCTION or COMMENT
URL
getURL()
base URL ??
String
getUnparsedEntityURI(String name)
boolean
isId(String id)
if this is an attribute?? and it is of type ID ?

Field Details

ALLTYPES

public static final byte ALLTYPES

Field Value:
6


ATTRIBUTE

public static final byte ATTRIBUTE

Field Value:
2


COMMENT

public static final byte COMMENT

Field Value:
5


ELEMENT

public static final byte ELEMENT

Field Value:
0


N_TYPES

public static final int N_TYPES

Field Value:
6


PROCESSING_INSTRUCTION

public static final byte PROCESSING_INSTRUCTION

Field Value:
4


ROOT

public static final byte ROOT

Field Value:
3


TEXT

public static final byte TEXT

Field Value:
1

Method Details

compareTo

public int compareTo(Node node)
also compares document order


getAttribute

public Node getAttribute(Name name)
does this only work on Elements?


getAttributeValue

public String getAttributeValue(Name name)
does this only work on Elements?


getAttributes

public SafeNodeIterator getAttributes()
does this only work on Elements?


getChildren

public SafeNodeIterator getChildren()
as the name implies ...


getData

public String getData()
Returns text for TEXT node; value for attribute node; content for comment node; content after PI for PI node;


getElementWithId

public Node getElementWithId(String id)
finds an Element Node, in the this node's document, with the given ID


getFollowingSiblings

public SafeNodeIterator getFollowingSiblings()
as the name implies ...


getGeneratedId

public String getGeneratedId()
guaranteed to be unique (and repeatable)


getLineNumber

public int getLineNumber()
if decorated with locator events, this returns the line number in the XML source where this node was found


getName

public Name getName()
Returns element type name for element; attribute name for an attribute; target for a PI.


getNamespacePrefixMap

public NamespacePrefixMap getNamespacePrefixMap()
in-scope namespaces ??


getParent

public Node getParent()
as the name implies ...


getRoot

public Node getRoot()
gets the owning Document's root


getType

public byte getType()
returns one of: ELEMENT, TEXT, ATTRIBUTE, ROOT, PROCESSING_INSTRUCTION or COMMENT


getURL

public URL getURL()
base URL ??


getUnparsedEntityURI

public String getUnparsedEntityURI(String name)


isId

public boolean isId(String id)
if this is an attribute?? and it is of type ID ?