Logo Search packages:      
Sourcecode: lib-dom-java version File versions  Download package

org::w3c::dom::Text Interface Reference

Inheritance diagram for org::w3c::dom::Text:

org::w3c::dom::CharacterData org::w3c::dom::Node org::w3c::dom::CDATASection

List of all members.

Detailed Description

The Text interface represents the textual content (termed character data in XML) of an Element or Attr. If there is no markup inside an element's content, the text is contained in a single object implementing the Text interface that is the only child of the element. If there is markup, it is parsed into a list of elements and Text nodes that form the list of children of the element.

When a document is first made available via the DOM, there is only one Text node for each block of text. Users may create adjacent Text nodes that represent the contents of a given element without any intervening markup, but should be aware that there is no way to represent the separations between these nodes in XML or HTML, so they will not (in general) persist between DOM editing sessions. The normalize() method on Element merges any such adjacent Text objects into a single node for each block of text; this is recommended before employing operations that depend on a particular document structure, such as navigation with XPointers.

Definition at line 30 of file Text.java.

Public Member Functions

Node appendChild (Node newChild) throws DOMException
void appendData (String arg) throws DOMException
Node cloneNode (boolean deep)
void deleteData (int offset, int count) throws DOMException
NamedNodeMap getAttributes ()
NodeList getChildNodes ()
String getData () throws DOMException
Node getFirstChild ()
Node getLastChild ()
int getLength ()
Node getNextSibling ()
String getNodeName ()
short getNodeType ()
String getNodeValue () throws DOMException
Document getOwnerDocument ()
Node getParentNode ()
Node getPreviousSibling ()
boolean hasChildNodes ()
Node insertBefore (Node newChild, Node refChild) throws DOMException
void insertData (int offset, String arg) throws DOMException
Node removeChild (Node oldChild) throws DOMException
Node replaceChild (Node newChild, Node oldChild) throws DOMException
void replaceData (int offset, int count, String arg) throws DOMException
void setData (String data) throws DOMException
void setNodeValue (String nodeValue) throws DOMException
Text splitText (int offset) throws DOMException
String substringData (int offset, int count) throws DOMException

Static Public Attributes

static final short ATTRIBUTE_NODE = 2
static final short CDATA_SECTION_NODE = 4
static final short COMMENT_NODE = 8
static final short DOCUMENT_FRAGMENT_NODE = 11
static final short DOCUMENT_NODE = 9
static final short DOCUMENT_TYPE_NODE = 10
static final short ELEMENT_NODE = 1
static final short ENTITY_NODE = 6
static final short ENTITY_REFERENCE_NODE = 5
static final short NOTATION_NODE = 12
static final short PROCESSING_INSTRUCTION_NODE = 7
static final short TEXT_NODE = 3

The documentation for this interface was generated from the following file:

Generated by  Doxygen 1.6.0   Back to index