![]() |
CopperSpice API
2.0.0
|
The QDomDocumentFragment class is a tree of QDomNodes which is not usually a complete QDomDocument. More...
Public Methods | |
| QDomDocumentFragment () | |
| QDomDocumentFragment (const QDomDocumentFragment &other) | |
| QDomNode::NodeType | nodeType () const |
| QDomDocumentFragment & | operator= (const QDomDocumentFragment &other) |
Public Methods inherited from QDomNode | |
| QDomNode () | |
| QDomNode (const QDomNode &other) | |
| ~QDomNode () | |
| QDomNode | appendChild (const QDomNode &newChild) |
| QDomNamedNodeMap | attributes () const |
| QDomNodeList | childNodes () const |
| void | clear () |
| QDomNode | cloneNode (bool deep=true) const |
| int | columnNumber () const |
| QDomNode | firstChild () const |
| QDomElement | firstChildElement (const QString &tagName=QString ()) const |
| bool | hasAttributes () const |
| bool | hasChildNodes () const |
| QDomNode | insertAfter (const QDomNode &newChild, const QDomNode &refChild) |
| QDomNode | insertBefore (const QDomNode &newChild, const QDomNode &refChild) |
| bool | isAttr () const |
| bool | isCDATASection () const |
| bool | isCharacterData () const |
| bool | isComment () const |
| bool | isDocument () const |
| bool | isDocumentFragment () const |
| bool | isDocumentType () const |
| bool | isElement () const |
| bool | isEntity () const |
| bool | isEntityReference () const |
| bool | isNotation () const |
| bool | isNull () const |
| bool | isProcessingInstruction () const |
| bool | isSupported (const QString &feature, const QString &version) const |
| bool | isText () const |
| QDomNode | lastChild () const |
| QDomElement | lastChildElement (const QString &tagName=QString ()) const |
| int | lineNumber () const |
| QString | localName () const |
| QDomNode | namedItem (const QString &name) const |
| QString | namespaceURI () const |
| QDomNode | nextSibling () const |
| QDomElement | nextSiblingElement (const QString &tagName=QString ()) const |
| QString | nodeName () const |
| NodeType | nodeType () const |
| QString | nodeValue () const |
| void | normalize () |
| bool | operator!= (const QDomNode &n) const |
| QDomNode & | operator= (const QDomNode &other) |
| bool | operator== (const QDomNode &n) const |
| QDomDocument | ownerDocument () const |
| QDomNode | parentNode () const |
| QString | prefix () const |
| QDomNode | previousSibling () const |
| QDomElement | previousSiblingElement (const QString &tagName=QString ()) const |
| QDomNode | removeChild (const QDomNode &oldChild) |
| QDomNode | replaceChild (const QDomNode &newChild, const QDomNode &oldChild) |
| void | save (QTextStream &stream, int indent, QDomNode::EncodingPolicy policy=QDomNode::EncodingFromDocument) const |
| void | setNodeValue (const QString &value) |
| void | setPrefix (const QString &prefix) |
| QDomAttr | toAttr () const |
| QDomCDATASection | toCDATASection () const |
| QDomCharacterData | toCharacterData () const |
| QDomComment | toComment () const |
| QDomDocument | toDocument () const |
| QDomDocumentFragment | toDocumentFragment () const |
| QDomDocumentType | toDocumentType () const |
| QDomElement | toElement () const |
| QDomEntity | toEntity () const |
| QDomEntityReference | toEntityReference () const |
| QDomNotation | toNotation () const |
| QDomProcessingInstruction | toProcessingInstruction () const |
| QDomText | toText () const |
Friends | |
| class | QDomDocument |
| class | QDomNode |
Additional Inherited Members | |
Public Types inherited from QDomNode | |
| enum | EncodingPolicy |
| enum | NodeType |
Related Functions inherited from QDomNode | |
| QTextStream & | operator<< (QTextStream &str, const QDomNode &node) |
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.
| QDomDocumentFragment::QDomDocumentFragment | ( | ) |
Constructs an empty document fragment.
| QDomDocumentFragment::QDomDocumentFragment | ( | const QDomDocumentFragment & | other | ) |
Copy constructs a new QDomDocumentFragment from other.
|
inline |
Returns DocumentFragment.
| QDomDocumentFragment & QDomDocumentFragment::operator= | ( | const QDomDocumentFragment & | other | ) |
Copy assigns from other and returns a reference to this object.