net.jxta.document
Interface TextElement
- All Known Subinterfaces:
- StructuredTextDocument
- public interface TextElement
- extends Element
This abstract class describes a {@see StructuredTextDocument} element. An element
represents a portion of a {@see StructuredTextDocument}. An element has a name and
may have a value. An element may also have additional elements as chilren.
- Since:
- Jxta 1.0
- See Also:
Codat
,
Document
,
StructuredDocument
Method Summary |
void |
appendChild(TextElement element)
Add a child element to this element |
java.util.Enumeration |
getChildren(java.lang.String name)
Returns an enumeration of the immediate children of this element whose
name match the specified string. |
java.lang.String |
getName()
Get the name associated with an element. |
java.lang.String |
getTextValue()
Get the value (if any) associated with an element. |
getName
public java.lang.String getName()
- Get the name associated with an element.
- Returns:
- A string containing the name of this element.
getTextValue
public java.lang.String getTextValue()
- Get the value (if any) associated with an element.
- Returns:
- A string containing the value of this element, if any, otherwise null.
appendChild
public void appendChild(TextElement element)
- Add a child element to this element
- Parameters:
element
- the element to be added as a child
getChildren
public java.util.Enumeration getChildren(java.lang.String name)
- Returns an enumeration of the immediate children of this element whose
name match the specified string.
- Parameters:
name
- The name which will be matched against.- Returns:
- An enumeration containing all of the children of this element.