|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--com.adventnet.utilities.xml.dom.XMLNode
This represents an XML data element .
nodeType variable identifies the type of the data element. Valid values are ELEMENT, DOCUMENT, ENTITYREF, COMMENT, PCDATA, CDATA
attributeList Hashtable stores the attributes of an element.
parentNode provides a referenence to the parent XMLNode
childNodes Vector provides references to its child nodes
| Field Summary | |
(package private) java.util.Vector |
attrNameVector
|
static int |
CDATA
|
static int |
COMMENT
Comment Node |
static int |
DOCUMENT
Document Node |
static int |
ELEMENT
Element Node |
static int |
ENTITYREF
Entity Reference |
static int |
PCDATA
|
| Constructor Summary | |
XMLNode()
Constructor to create a new instance of XMLNode |
|
| Method Summary | |
void |
addChildNode(XMLNode childNode)
Adds a node as a child node to this node. |
java.util.Enumeration |
children()
Returns an Enumeration of child nodes |
java.lang.Object |
clone()
Clones the XML node along with its children |
void |
deleteChildNode(XMLNode node)
Deletes the specified node from the childList |
void |
deleteNode()
Deletes all the children of this node |
java.lang.Object |
getAttribute(java.lang.String attrName)
Gets the value of the attribute for the specified attrName |
java.util.Hashtable |
getAttributeList()
Gets the attribute list of this node |
java.util.Vector |
getAttrKeysVector()
Gets the attribute keys as a Vector |
int |
getChildCount()
Gets the number of children for this node |
XMLNode |
getChildNode(java.lang.String s)
Gets the child node with tag name childName. |
java.util.Vector |
getChildNodes()
Gets all the children under this node |
java.lang.String |
getNodeName()
Gets the name of the node |
int |
getNodeType()
Gets the node type, For eg: ELEMENT |
java.lang.String |
getNodeValue()
Gets the value of the node. |
XMLNode |
getParentNode()
Gets the parent node for this node. |
boolean |
isLeaf()
|
void |
removeAttribute(java.lang.String attrName)
Method to remove a attribute from the attribute list if an entry exists with this attrName as a key |
int |
removeFromParent()
|
void |
setAttribute(java.lang.String attrName,
java.lang.Object attrValue)
Sets the attrName and a value which is an Object type data in the the attribute list for this node. |
void |
setAttribute(java.lang.String attrName,
java.lang.String attrValue)
Sets the attrName and attrValue in the attribute list for this node. |
void |
setAttributeList(java.util.Hashtable attrList)
Sets a attribute list for this node |
void |
setChildNodes(java.util.Vector childNodesV)
Sets the children for this node as a Vector |
void |
setNodeName(java.lang.String nName)
Sets the name of the node |
void |
setNodeType(int nType)
Sets the node's type |
void |
setNodeValue(java.lang.String nValue)
Sets a value for the node. |
void |
setParentNode(XMLNode pNode)
Sets the parent node for this node |
java.lang.String |
toString()
Returns the node name of this node |
| Methods inherited from class java.lang.Object |
|
| Field Detail |
public static final int ELEMENT
public static final int DOCUMENT
public static final int ENTITYREF
public static final int COMMENT
public static final int PCDATA
public static final int CDATA
java.util.Vector attrNameVector
| Constructor Detail |
public XMLNode()
| Method Detail |
public int getNodeType()
public void setNodeType(int nType)
public java.lang.String getNodeValue()
public void setNodeValue(java.lang.String nValue)
public java.lang.String getNodeName()
public void setNodeName(java.lang.String nName)
public java.util.Hashtable getAttributeList()
public void setAttributeList(java.util.Hashtable attrList)
public java.util.Vector getChildNodes()
public XMLNode getChildNode(java.lang.String s)
public void setChildNodes(java.util.Vector childNodesV)
public XMLNode getParentNode()
public void setParentNode(XMLNode pNode)
public java.lang.Object getAttribute(java.lang.String attrName)
public java.util.Vector getAttrKeysVector()
public void setAttribute(java.lang.String attrName,
java.lang.String attrValue)
public void setAttribute(java.lang.String attrName,
java.lang.Object attrValue)
public void removeAttribute(java.lang.String attrName)
public void addChildNode(XMLNode childNode)
public void deleteNode()
public void deleteChildNode(XMLNode node)
public boolean isLeaf()
public int removeFromParent()
public int getChildCount()
public java.util.Enumeration children()
public java.lang.Object clone()
public java.lang.String toString()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||