com.trolltech.qt.xml
Class QDomDocumentFragment
java.lang.Object
com.trolltech.qt.QSignalEmitter
com.trolltech.qt.QtJambiObject
com.trolltech.qt.xml.QDomNode
com.trolltech.qt.xml.QDomDocumentFragment
- All Implemented Interfaces:
- QtJambiInterface, java.lang.Cloneable
public class QDomDocumentFragment
- extends QDomNode
- implements java.lang.Cloneable
The QDomDocumentFragment class is a tree of QDomNodes which is not usually a complete QDomDocument. If you want to do complex tree operations it is useful to have a lightweight class to store nodes and their relations. QDomDocumentFragment stores a subtree of a document which does not necessarily represent a well-formed XML document.
QDomDocumentFragment is also useful if you want to group several nodes in a list and insert them all together as children of some node. In these cases QDomDocumentFragment can be used as a temporary container for this list of children.
The most important feature of QDomDocumentFragment is that it is treated in a special way by QDomNode::insertAfter(), QDomNode::insertBefore(), QDomNode::replaceChild() and QDomNode::appendChild(): instead of inserting the fragment itself, all the fragment's children are inserted.
| 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, 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 java.lang.Object |
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
QDomDocumentFragment
public QDomDocumentFragment()
- Constructs an empty document fragment.
QDomDocumentFragment
public QDomDocumentFragment(QDomDocumentFragment 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().
fromNativePointer
public static QDomDocumentFragment fromNativePointer(QNativePointer nativePointer)
- This method returns the QDomDocumentFragment instance pointed to by nativePointer.
nativePointerArray
public static QNativePointer nativePointerArray(QDomDocumentFragment[] array)
- This function returns a QNativePointer that is pointing to the specified QDomDocumentFragment array.
clone
public QDomDocumentFragment clone()
- This method is reimplemented for internal reasons
- Overrides:
clone in class QDomNode