![]() |
Home · All Classes · Main Classes · Grouped Classes · Modules · Functions | ![]() |
The QSimpleXmlNodeModel class provides a simple yet powerful way of implementing QAbstractXmlNodeModel. More...
#include <QSimpleXmlNodeModel>
Inherits QAbstractXmlNodeModel.
Note: All the functions in this class are reentrant.
This class was introduced in Qt 4.4.
The QSimpleXmlNodeModel class provides a simple yet powerful way of implementing QAbstractXmlNodeModel.
Since QAbstractXmlNodeModel::iterate() requires a sub-class of QAbstractXmlForwardIterator to be returned for each axis, it can be a bit time consuming to implement. For that reason QSimpleXmlNodeModel exists which has nextFromSimpleAxis(), that that is a quick but often sufficient way of providing the node navigation. Behind the scenes QSimpleXmlNodeModel::iterate() "emulates" the full XPath axes using nextFromSimpleAxis().
Apart from nextFromSimpleAxis(), QSimpleXmlNodeModel provides default implementations for many of the members in QAbstractXmlNodeModel that are suitable for a wide range of scenarios.
Sub-classes of QSimpleXmlNodeModel must be thread-safe, just like sub-classes other sub-classes of QAbstractXmlNodeModel.
Constructs a QSimpleXmlNodeModel instance that can be used with the name pool namePool. It can subsequently be accessed with namePool().
Destructor.
Returns the base URI for node. This is always the document URI. This is safe, works and is often ok.
Reimplemented from QAbstractXmlNodeModel.
See also documentUri().
Always returns a default constructed QXmlNodeModelIndex instance, regardless of id.
This effectively means the model has no elements that has an id.
Reimplemented from QAbstractXmlNodeModel.
Returns the name pool that is associated with this model. The implementation of name() would use this to create names.
Returns always an empty QVector. This signals that no namespace bindings are in scope for node.
Reimplemented from QAbstractXmlNodeModel.
Always returns an empty vector, regardless of idref.
This effectively means the model has no elements or attributes of type IDREF.
Reimplemented from QAbstractXmlNodeModel.
If node is an element or attribute, typedValue() is called, and the return value converted to a string, as per XQuery's rules.
If node is another type of node, the empty string is returned.
If this function is overriden for for instance comments or processing instructions, it is important to remember to call this function for elements and attribute, if they have atomic values that are not of type xs:string, such that they get formatted according to XQuery.
Reimplemented from QAbstractXmlNodeModel.
Copyright © 2008 Trolltech | Trademarks | Qt 4.4.0 |