![]() | Home · All Classes · Modules |
The QXmlItem class represents an item in XQuery and XPath, which is either a node or an atomic value. More...
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.
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.
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().
PyQt 4.4.2 for X11 | Copyright © Riverbank Computing Ltd and Trolltech AS 2008 | Qt 4.4.0 |