com.trolltech.qt.xml
Class QDomCharacterData

java.lang.Object
  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
Direct Known Subclasses:
QDomComment, QDomText

public class QDomCharacterData
extends QDomNode

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, 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.Signal0, QSignalEmitter.Signal1<A>, QSignalEmitter.Signal2<A,B>, QSignalEmitter.Signal3<A,B,C>, QSignalEmitter.Signal4<A,B,C,D>, QSignalEmitter.Signal5<A,B,C,D,E>, QSignalEmitter.Signal6<A,B,C,D,E,F>, QSignalEmitter.Signal7<A,B,C,D,E,F,G>, QSignalEmitter.Signal8<A,B,C,D,E,F,G,H>, QSignalEmitter.Signal9<A,B,C,D,E,F,G,H,I>
 
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.
 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.
static QDomCharacterData fromNativePointer(QNativePointer nativePointer)
          This function returns the QDomCharacterData instance pointed to by nativePointer
 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.
static QNativePointer nativePointerArray(QDomCharacterData[] array)
          This function returns a QNativePointer that is pointing to the specified QDomCharacterData array.
 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 arg__1.
 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, equals, 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, nativePointerArray, 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, finalize, reassignNativeResources, tr, tr, tr
 
Methods inherited from class com.trolltech.qt.QSignalEmitter
blockSignals, disconnect, disconnect, signalsBlocked, signalSender, thread
 
Methods inherited from class java.lang.Object
clone, 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 arg__1.

See Also:
data

substringData

public final java.lang.String substringData(int offset,
                                            int count)

Returns the substring of length count from position offset.


fromNativePointer

public static QDomCharacterData fromNativePointer(QNativePointer nativePointer)
This function returns the QDomCharacterData instance pointed to by nativePointer

Parameters:
nativePointer - the QNativePointer of which object should be returned.

nativePointerArray

public static QNativePointer nativePointerArray(QDomCharacterData[] array)
This function returns a QNativePointer that is pointing to the specified QDomCharacterData array.

Parameters:
array - the array that the returned pointer will point to.
Returns:
a QNativePointer that is pointing to the specified array.