|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object nu.staldal.xmltree.Node
public abstract class Node
Base class for a node in an XMLTree.
Field Summary | |
---|---|
protected NodeWithChildren |
parent
|
Constructor Summary | |
---|---|
|
Node()
Default constructor. |
protected |
Node(Node node)
Copy constructor. |
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 name)
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 |
---|
protected NodeWithChildren parent
Constructor Detail |
---|
public Node()
protected Node(Node node)
node
- the node to copyMethod 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.SAXException
- if any of the ContentHandler methods throw itpublic java.lang.String getPublicId()
getPublicId
in interface org.xml.sax.Locator
public java.lang.String getSystemId()
getSystemId
in interface org.xml.sax.Locator
public int getLineNumber()
getLineNumber
in interface org.xml.sax.Locator
getColumnNumber()
public int getColumnNumber()
getColumnNumber
in interface org.xml.sax.Locator
getLineNumber()
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 effectpublic java.lang.String getInheritedAttribute(java.lang.String name)
null
if the root is reached without
finding the attribute). Useful for e.g. xml:lang.
name
- 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 |