com.trolltech.qt.xml
Class QDomCharacterData

java.lang.Object
  extended by com.trolltech.qt.internal.QSignalEmitterInternal
      extended by com.trolltech.qt.QSignalEmitter
          extended by com.trolltech.qt.QtJambiObject
              extended by com.trolltech.qt.xml.QDomNode
                  extended by com.trolltech.qt.xml.QDomCharacterData
All Implemented Interfaces:
QtJambiInterface, java.lang.Cloneable
Direct Known Subclasses:
QDomComment, QDomText

public class QDomCharacterData
extends QDomNode
implements java.lang.Cloneable

The QDomCharacterData class represents a generic string in the DOM. Character data as used in XML specifies a generic data string. More specialized versions of this class are QDomText, QDomComment and QDomCDATASection.

The data string is set with setData() and retrieved with data(). You can retrieve a portion of the data string using substringData(). Extra data can be appended with appendData(), or inserted with insertData(). Portions of the data string can be deleted with deleteData() or replaced with replaceData(). The length of the data string is returned by length().

The node type of the node containing this character data is returned by nodeType().

See also:
QDomText, QDomComment, and QDomCDATASection.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.trolltech.qt.xml.QDomNode
QDomNode.EncodingPolicy, QDomNode.NodeType
 
Nested classes/interfaces inherited from class com.trolltech.qt.QSignalEmitter
QSignalEmitter.AbstractSignal, QSignalEmitter.PrivateSignal0, QSignalEmitter.PrivateSignal1, QSignalEmitter.PrivateSignal2, QSignalEmitter.PrivateSignal3, QSignalEmitter.PrivateSignal4, QSignalEmitter.PrivateSignal5, QSignalEmitter.PrivateSignal6, QSignalEmitter.PrivateSignal7, QSignalEmitter.PrivateSignal8, QSignalEmitter.PrivateSignal9, QSignalEmitter.Signal0, QSignalEmitter.Signal1, QSignalEmitter.Signal2, QSignalEmitter.Signal3, QSignalEmitter.Signal4, QSignalEmitter.Signal5, QSignalEmitter.Signal6, QSignalEmitter.Signal7, QSignalEmitter.Signal8, QSignalEmitter.Signal9
 
Nested classes/interfaces inherited from class com.trolltech.qt.internal.QSignalEmitterInternal
com.trolltech.qt.internal.QSignalEmitterInternal.AbstractSignalInternal
 
Field Summary
 
Fields inherited from class com.trolltech.qt.internal.QSignalEmitterInternal
currentSender
 
Constructor Summary
QDomCharacterData()
          Constructs an empty character data object.
QDomCharacterData(QDomCharacterData x)
          Constructs a copy of x.
 
Method Summary
 void appendData(java.lang.String arg)
          Appends the string arg to the stored string.
 QDomCharacterData clone()
          This method is reimplemented for internal reasons
 java.lang.String data()
          Returns the string stored in this object.
 void deleteData(int offset, int count)
          Deletes a substring of length count from position offset.
 void insertData(int offset, java.lang.String arg)
          Inserts the string arg into the stored string at position offset.
 int length()
          Returns the length of the stored string.
 void replaceData(int offset, int count, java.lang.String arg)
          Replaces the substring of length count starting at position offset with the string arg.
 void setData(java.lang.String arg__1)
          Sets this object's string to v.
 java.lang.String substringData(int offset, int count)
          Returns the substring of length count from position offset.
 
Methods inherited from class com.trolltech.qt.xml.QDomNode
appendChild, childNodes, clear, cloneNode, cloneNode, columnNumber, firstChild, firstChildElement, firstChildElement, hasAttributes, hasChildNodes, insertAfter, insertBefore, isAttr, isCDATASection, isCharacterData, isComment, isDocument, isDocumentFragment, isDocumentType, isElement, isEntity, isEntityReference, isNotation, isNull, isProcessingInstruction, isSupported, isText, lastChild, lastChildElement, lastChildElement, lineNumber, localName, namedItem, namespaceURI, nextSibling, nextSiblingElement, nextSiblingElement, nodeName, nodeType, nodeValue, normalize, ownerDocument, parentNode, prefix, previousSibling, previousSiblingElement, previousSiblingElement, removeChild, replaceChild, save, save, setNodeValue, setPrefix, toAttr, toCDATASection, toCharacterData, toComment, toDocument, toDocumentFragment, toDocumentType, toElement, toEntity, toEntityReference, toNotation, toProcessingInstruction, toText, writeTo
 
Methods inherited from class com.trolltech.qt.QtJambiObject
dispose, disposed, equals, finalize, reassignNativeResources, tr, tr, tr
 
Methods inherited from class com.trolltech.qt.QSignalEmitter
blockSignals, disconnect, disconnect, signalsBlocked, signalSender, thread
 
Methods inherited from class com.trolltech.qt.internal.QSignalEmitterInternal
__qt_signalInitialization
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.trolltech.qt.QtJambiInterface
disableGarbageCollection, nativeId, nativePointer, reenableGarbageCollection, setJavaOwnership
 

Constructor Detail

QDomCharacterData

public QDomCharacterData()
Constructs an empty character data object.


QDomCharacterData

public QDomCharacterData(QDomCharacterData x)
Constructs a copy of x.

The data of the copy is shared (shallow copy): modifying one node will also change the other. If you want to make a deep copy, use cloneNode().

Method Detail

appendData

public final void appendData(java.lang.String arg)
Appends the string arg to the stored string.


data

public final java.lang.String data()
Returns the string stored in this object.

If the node is a null node, it will return an empty string.

See also:
setData().


deleteData

public final void deleteData(int offset,
                             int count)
Deletes a substring of length count from position offset.


insertData

public final void insertData(int offset,
                             java.lang.String arg)
Inserts the string arg into the stored string at position offset.


length

public final int length()
Returns the length of the stored string.


replaceData

public final void replaceData(int offset,
                              int count,
                              java.lang.String arg)
Replaces the substring of length count starting at position offset with the string arg.


setData

public final void setData(java.lang.String arg__1)
Sets this object's string to v.

See also:
data().


substringData

public final java.lang.String substringData(int offset,
                                            int count)
Returns the substring of length count from position offset.


clone

public QDomCharacterData clone()
This method is reimplemented for internal reasons

Overrides:
clone in class QDomNode