|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnu.staldal.xtree.Node
public abstract class Node
Base class for a node in an XTree.
| Field Summary | |
|---|---|
protected NodeWithChildren |
parent
|
static java.lang.String |
XML_NS
Namespace URI for the implicitly defined "xml" namespace. |
| Constructor Summary | |
|---|---|
Node()
|
|
| Method Summary | |
|---|---|
java.net.URL |
getBaseURI()
Returns the absolute base URI of this node. |
int |
getColumnNumber()
Return the column number where this node ends. |
java.lang.String |
getInheritedAttribute(java.lang.String namespaceURI,
java.lang.String localName)
Return the value of an inherited attribute. |
int |
getLineNumber()
Return the line number where this node ends. |
NodeWithChildren |
getParent()
Get the parent of this node. |
boolean |
getPreserveSpace()
Return the value of any xml:space attribute in force for this node. |
java.lang.String |
getPublicId()
Return the public identifier for this node. |
java.lang.String |
getSystemId()
Return the system identifier for this node. |
boolean |
isWhitespaceNode()
Check if this node consist of whitespace only. |
java.lang.String |
lookupNamespacePrefix(java.lang.String URI)
Lookup a prefix which has been mapped to a namespace URI. |
java.lang.String |
lookupNamespaceURI(java.lang.String prefix)
Lookup the namespace URI which has been mapped to a prefix. |
void |
setColumn(int column)
|
void |
setLine(int line)
|
void |
setPublicId(java.lang.String publicId)
|
void |
setSystemId(java.lang.String systemId)
|
abstract void |
toSAX(org.xml.sax.ContentHandler sax)
Serialize this node, and recursively the (sub)tree beneath, into SAX2 events. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String XML_NS
protected NodeWithChildren parent
| Constructor Detail |
|---|
public Node()
| Method Detail |
|---|
public void setPublicId(java.lang.String publicId)
public void setSystemId(java.lang.String systemId)
public void setLine(int line)
public void setColumn(int column)
public NodeWithChildren getParent()
null if this node has no parent.
public abstract void toSAX(org.xml.sax.ContentHandler sax)
throws org.xml.sax.SAXException
sax - the SAX2 ContentHander to fire events on.
org.xml.sax.SAXExceptionpublic java.lang.String getPublicId()
getPublicId in interface org.xml.sax.Locatorpublic java.lang.String getSystemId()
getSystemId in interface org.xml.sax.Locatorpublic int getLineNumber()
getLineNumber in interface org.xml.sax.LocatorgetColumnNumber()public int getColumnNumber()
getColumnNumber in interface org.xml.sax.LocatorgetLineNumber()public java.lang.String lookupNamespaceURI(java.lang.String prefix)
prefix - the prefix, may be the empty string which denotes
the default namespace.
null
if the prefix is not mapped to any namespace URI,
or the empty string of prefix is the empty string and there is no
default namespace mapping.public java.lang.String lookupNamespacePrefix(java.lang.String URI)
URI - the namespace URI
null if no prefix is mapped to the namespace URI.public java.net.URL getBaseURI()
null if unknown.public boolean getPreserveSpace()
true if an xml:space="preserve" is in effect
public java.lang.String getInheritedAttribute(java.lang.String namespaceURI,
java.lang.String localName)
null if the root is
reached without finding the attribute). Useful for e.g. xml:lang.
namespaceURI - the namespace URI, may be the empty stringlocalName - the attribute name
null if no such attribute is foundpublic boolean isWhitespaceNode()
true if and only if this is a Text node which
contains no other characters than whitespace.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||