|
Project JXTA | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.jxta.impl.document.TextElementCommon
net.jxta.impl.document.XMLElementCommon
net.jxta.impl.document.DOMXMLElement
This class represent an element of an XML document. XML Documents are formed as a hierarchy of elements. Each element provides a proxy for DOM elements and the text nodes containing values.
Field Summary | |
protected Node |
domNode
The DOM node for which this element is a proxy. |
protected DOMXMLDocument |
root
|
Constructor Summary | |
protected |
DOMXMLElement(DOMXMLDocument root,
Node node)
Constructor for associating a DOM node with a StructuredDocument Element. |
Method Summary | |
String |
addAttribute(Attribute newAttrib)
Adds an attribute with the given name and value. |
String |
addAttribute(String name,
String value)
Adds an attribute with the given name and value. |
void |
appendChild(TextElement element)
Add a child element to this element |
boolean |
equals(Object element)
Tests two elements for equality. |
protected Node |
getAssocNode()
Returns the DOM Node associated with this StructuredDocument element. |
Attribute |
getAttribute(String name)
returns a single attribute which matches the name provided. |
Enumeration |
getAttributes()
Returns an enumerations of the attributes assosicated with this object. |
Enumeration |
getChildren()
Returns an enumeration of the immediate children of this element |
Enumeration |
getChildren(String name)
Returns an enumeration of the immediate children of this element whose name match the specified string. |
String |
getName()
Get the name associated with an element. |
Element |
getParent()
Get the parent of this element. |
StructuredDocument |
getRoot()
Get the root element of the hierarchy this element belongs to. |
String |
getTextValue()
Get the value (if any) associated with an element. |
Methods inherited from class net.jxta.impl.document.TextElementCommon |
appendChild, getChildren, getKey, getValue |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface net.jxta.document.Element |
appendChild, getChildren, getKey, getValue |
Field Detail |
protected DOMXMLDocument root
protected Node domNode
Constructor Detail |
protected DOMXMLElement(DOMXMLDocument root, Node node)
root
- the DOM not which is to be associated with this element.Method Detail |
public String getName()
public String getTextValue()
public StructuredDocument getRoot()
public Element getParent()
public void appendChild(TextElement element)
element
- the element to be added as a childpublic Enumeration getChildren()
public Enumeration getChildren(String name)
name
- The name which will be matched against.
public boolean equals(Object element)
element
- the element to be compared against.
protected Node getAssocNode()
public String addAttribute(String name, String value)
name
- name of the attribute.value
- value for the attribute.
public String addAttribute(Attribute newAttrib)
newAttrib
- new attribute.
public Enumeration getAttributes()
public Attribute getAttribute(String name)
|
JXTA J2SE | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |