| java.lang.Object com.rimfaxe.xml.xmlreader.Node
All known Subclasses: com.rimfaxe.xml.xmlreader.Text, com.rimfaxe.xml.xmlreader.Document, com.rimfaxe.xml.xmlreader.Element,
Node | abstract public class Node implements Cloneable(Code) | | An XML node.
Copyright (C) 2002 Hewlett-Packard Company.
This file is part of Sparta, an XML Parser, DOM, and XPath library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public License
as published by the Free Software Foundation; either version 2.1 of
the License, or (at your option) any later version. This library
is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE.
See Also: GNU Lesser General Public License version: $Date: 2003/01/09 00:59:33 $ $Revision: 1.5 $ author: Eamonn O'Brien-Strain |
Method Summary | |
public Object | clone() Return a deep copy of this node. | public Object | getAnnotation() | public Node | getNextSibling() Return the next node in the parent's list of children, or null if no such node. | public Document | getOwnerDocument() The document that contains this node. | public Element | getParentNode() The element that contains this node or null if this is a Document
or the root element of a document. | public Node | getPreviousSibling() Return the previous node in the parent's list of children, or null if no such node. | protected static void | htmlEncode(Writer writer, String string) Quote special XML characters '<', '>', '&', '"' if necessary,
and write to character stream. | void | insertAtEndOfLinkedList(Node lastChild) | Element | makeMatching(Element parent, Step step, String msgContext) | void | notifyObservers() | void | removeFromLinkedList() | void | replaceInLinkedList(Node replacement) | public void | setAnnotation(Object annotation) Use by client to attach arbitrary data to DOM document. | void | setOwnerDocument(Document doc) | void | setParentNode(Element parentNode) | public String | toString() Hierarchically concatenated text nodes. | abstract void | toString(Writer writer) | public String | toXml() XML representation of this node. | abstract void | toXml(Writer writer) | abstract public Element | xpathSelectElement(String xpath) Select the first element that matches the relative XPath
expression with respect to this node, or null if
there is no match. | abstract public Enumeration | xpathSelectElements(String xpath) Select all the elements that match the relative XPath
expression with respect to this node. | abstract public String | xpathSelectString(String xpath) Select the first element that matches the relative XPath
expression with respect to this node, or null if
there is no match. | abstract public Enumeration | xpathSelectStrings(String xpath) Select all the strings that match the relative XPath
expression with respect to this node. | public void | xpathSetStrings(String xpath, String value) For an xpath expression of the form "xpathPrefix/@attrName" set the
attribute "attrName" to attrValue on all elements that match
"XpathPrefix" which is an arbitrary xpath expression matching elements,
or for an xpath expression of the form "xpathPrefixe/text()" set the
text of all matching text nodes. |
clone | public Object clone()(Code) | | Return a deep copy of this node.
|
getNextSibling | public Node getNextSibling()(Code) | | Return the next node in the parent's list of children, or null if no such node.
|
getOwnerDocument | public Document getOwnerDocument()(Code) | | The document that contains this node. null IFF this is a Document
|
getParentNode | public Element getParentNode()(Code) | | The element that contains this node or null if this is a Document
or the root element of a document.
|
getPreviousSibling | public Node getPreviousSibling()(Code) | | Return the previous node in the parent's list of children, or null if no such node.
|
htmlEncode | protected static void htmlEncode(Writer writer, String string) throws IOException(Code) | | Quote special XML characters '<', '>', '&', '"' if necessary,
and write to character stream. We write to a character stream
rather than simply returning a stream to avoid creating
unneccessary objects.
|
insertAtEndOfLinkedList | void insertAtEndOfLinkedList(Node lastChild)(Code) | | |
notifyObservers | void notifyObservers()(Code) | | |
removeFromLinkedList | void removeFromLinkedList()(Code) | | |
replaceInLinkedList | void replaceInLinkedList(Node replacement)(Code) | | |
setAnnotation | public void setAnnotation(Object annotation)(Code) | | Use by client to attach arbitrary data to DOM document.
Does not update indices and other observers.
|
toString | public String toString()(Code) | | Hierarchically concatenated text nodes.
|
xpathSelectElement | abstract public Element xpathSelectElement(String xpath) throws ParseException(Code) | | Select the first element that matches the relative XPath
expression with respect to this node, or null if
there is no match.
|
xpathSelectElements | abstract public Enumeration xpathSelectElements(String xpath) throws ParseException(Code) | | Select all the elements that match the relative XPath
expression with respect to this node.
|
xpathSelectString | abstract public String xpathSelectString(String xpath) throws ParseException(Code) | | Select the first element that matches the relative XPath
expression with respect to this node, or null if
there is no match.
|
xpathSelectStrings | abstract public Enumeration xpathSelectStrings(String xpath) throws ParseException(Code) | | Select all the strings that match the relative XPath
expression with respect to this node.
|
xpathSetStrings | public void xpathSetStrings(String xpath, String value) throws ParseException(Code) | | For an xpath expression of the form "xpathPrefix/@attrName" set the
attribute "attrName" to attrValue on all elements that match
"XpathPrefix" which is an arbitrary xpath expression matching elements,
or for an xpath expression of the form "xpathPrefixe/text()" set the
text of all matching text nodes.
(The following doc is used in the examples below.)
|
|
|