![]() |
Home · All Classes · Main Classes · Grouped Classes · Modules · Functions | ![]() |
The QXmlItem class represents an item in XQuery and XPath, which is either a node or an atomic value. More...
#include <QXmlItem>
Note: All the functions in this class are reentrant.
This class was introduced in Qt 4.4.
The QXmlItem class represents an item in XQuery and XPath, which is either a node or an atomic value.
In XQuery, all expressions evaluate to a sequence of items, where each item is an atomic value or a XML node. For instance, this query:
<aNode/>, xs:base64Binary("FFFF"), current-date(), 3e3, (: A floating point value :) attribute {"name"} {()}
evaluate to a sequence of five items: an element, an atomic value which is binary data encoded in base64, a date, a float, and an attribute node.
QXmlItem is the class that represents XQuery items in the Qt API. It is always either a node or an item, which isNode() and isAtomicValue() tells. Atomic values are represented in Qt using QVariant, and a QXmlitem can be converted to one by calling toAtomicValue(). Similarly, nodes are represented with QXmlNodeModelIndex, and those can be retrieved by calling toNodeModelIndex().
A default constructed QXmlItem instance is neither a node or an atomic value, it is null, as isNull() tells.
QXmlItem instances will dangle if the model that QXmlNodeModelIndex instances refers to is deleted.
A QAbstractXmlForwardIterator over QXmlItem.
Construct a null QXmlItem, which is neither a node nor an atomic value.
For a default constructed QXmlItem, isNull() returns true.
Constructs a QXmlItem instance that is a copy of other.
Constructs a QXmlItem instance that is a copy of node. This item will subsequently be a node.
See also QXmlItem::isNode().
Constructs a QXmlItem that is the atomic value atomicValue.
Destructs this QXmlItem instance.
Returns true if this item is an atomic value, otherwise false.
If this item is null, false is returned.
See also isNull() and isNode().
Returns true if this item is a Node, otherwise false.
If this item is null, false is returned.
See also isNull() and isAtomicValue().
Returns true if this QXmlItem instance do not represent an item.
Considers this item an atomic value, and returns it in the form of a QVariant instance.
If this QXmlItem is not an atomic value, the return value is a default constructed QVariant.
See also isAtomicValue().
Considers this item an node, and returns it in the form of a QXmlNodeModelIndex instance.
If this QXmlItem is not a node, the return value is undefined.
See also isNode().
Assigns other to this QXmlItem instance.
Copyright © 2008 Trolltech | Trademarks | Qt 4.4.0 |