| java.lang.Object com.rimfaxe.xml.xmlreader.Node com.rimfaxe.xml.xmlreader.Element
Element | public class Element extends Node (Code) | | A type of Node with a particular tagName that has a set of attributes and
can contain other nodes as children. An example of its form in XML in the form
<tagName attr1="value1" attr2="value2">
text
<childTag...>
<childTag...>
text
<childTag...>
text
</tagName>
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/27 23:30:58 $ $Revision: 1.5 $ author: Eamonn O'Brien-Strain See Also: org.w3c.dom.Element |
appendChild | public void appendChild(Node addedChild)(Code) | | Add node as child of this element, cloning node if it is this element or
an ancestor.
|
appendChildNoChecking | void appendChildNoChecking(Node addedChild)(Code) | | |
canHaveAsDescendent | boolean canHaveAsDescendent(Node node)(Code) | | |
clone | public Object clone()(Code) | | Create a deep clone of this Element. It will have the tagname
and attributes as this node. This method will be called
recursively to copy the while subtree of child Elements and
Text nodes.
|
cloneElement | public Element cloneElement(boolean deep)(Code) | | Create a clone of this node. It will
have the tagname and attributes as this node. If deep is
true, this method will be called recursively to copy the while
subtree of child Elements and text nodes.
|
cloneShallow | public Element cloneShallow()(Code) | | Create a shallow clone of this Element. It will have the
tagname and attributes as this Element but will not have child
Elements or Nodes.
|
equals | public boolean equals(Object thatO)(Code) | | To be equal elements must have the same tagname, they must
have the same children (applying equals recursivly) in the
same order and they must have the same attributes in any
order. Elements can be equal even if they are in different
documents, have different parents, have different siblings, or
have different annotations.
|
getAttribute | public String getAttribute(String name)(Code) | | value of attribute that has this name or null if no such attribute. |
getAttributeNames | public Enumeration getAttributeNames()(Code) | | Return enumeration of Strings
|
getFirstChild | public Node getFirstChild()(Code) | | either an Element or a Text node |
getLastChild | public Node getLastChild()(Code) | | either an Element or a Text node |
removeAttribute | public void removeAttribute(String name)(Code) | | |
setAttribute | public void setAttribute(String name, String value)(Code) | | Parameters: name - attribute name which must be non-null, non empty Parameters: value - attribue value. |
xpathEnsure | public boolean xpathEnsure(String xpath) throws ParseException(Code) | | Make sure this XPath exists, creating nodes if necessary,
returning true if any nodes created. Xpath must of the type that
returns an element (not a string).
|
xpathSelectElement | public Element xpathSelectElement(String xpath) throws ParseException(Code) | | Select the first element that matches the relative XPath
expression with respect to this element, or null if
there is no match.
|
xpathSelectElements | public Enumeration xpathSelectElements(String xpath) throws ParseException(Code) | | Select all the elements that match the relative XPath
expression with respect to this element.
|
xpathSelectString | public String xpathSelectString(String xpath) throws ParseException(Code) | | Select the first element that matches the relative XPath
expression with respect to this element, or null if
there is no match.
|
xpathSelectStrings | public Enumeration xpathSelectStrings(String xpath) throws ParseException(Code) | | Select all the strings that match the relative XPath
expression with respect to this element.
|
|
|