The QSimpleXmlNodeModel class is an implementation of QAbstractXmlNodeModel sufficient for many common cases. More...
#include <QSimpleXmlNodeModel>
Inherits: QAbstractXmlNodeModel.
Note: All functions in this class are reentrant.
This class was introduced in Qt 4.4.
QSimpleXmlNodeModel ( const QXmlNamePool & namePool ) | |
virtual | ~QSimpleXmlNodeModel () |
QXmlNamePool & | namePool () const |
virtual QUrl | baseUri ( const QXmlNodeModelIndex & node ) const |
virtual QXmlNodeModelIndex | elementById ( const QXmlName & id ) const |
virtual QVector<QXmlName> | namespaceBindings ( const QXmlNodeModelIndex & node ) const |
virtual QVector<QXmlNodeModelIndex> | nodesByIdref ( const QXmlName & idref ) const |
virtual QString | stringValue ( const QXmlNodeModelIndex & node ) const |
The QSimpleXmlNodeModel class is an implementation of QAbstractXmlNodeModel sufficient for many common cases.
Subclassing QAbstractXmlNodeModel can be a significant task, because it requires implementing several, complex member functions. QSimpleXmlNodeModel provides default implementations of these member functions that are suitable for a wide range of node models.
Subclasses of QSimpleXmlNodeModel must be thread-safe.
Constructs a QSimpleXmlNodeModel for use with with the specified namePool.
Destructor.
Reimplemented from QAbstractXmlNodeModel::baseUri().
Returns the base URI for node. This is always the document URI.
See also documentUri().
Reimplemented from QAbstractXmlNodeModel::elementById().
Always returns a default constructed QXmlNodeModelIndex instance, regardless of id.
This effectively means the model has no elements that have an id.
Returns the name pool associated with this model. The implementation of name() will use this name pool to create names.
Reimplemented from QAbstractXmlNodeModel::namespaceBindings().
Always returns an empty QVector. This signals that no namespace bindings are in scope for node.
Reimplemented from QAbstractXmlNodeModel::nodesByIdref().
Always returns an empty vector, regardless of idref.
This effectively means the model has no elements or attributes of type IDREF.
Reimplemented from QAbstractXmlNodeModel::stringValue().
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 overridden for comments or processing instructions, it is important to remember to call it (for elements and attributes having values not of type xs:string) to ensure that the values are formatted according to XQuery.
© 2008-2011 Nokia Corporation and/or its subsidiaries. Nokia, Qt and their respective logos are trademarks of Nokia Corporation in Finland and/or other countries worldwide.
All other trademarks are property of their respective owners. Privacy Policy
Licensees holding valid Qt Commercial licenses may use this document in accordance with the Qt Commercial License Agreement provided with the Software or, alternatively, in accordance with the terms contained in a written agreement between you and Nokia.
Alternatively, this document may be used under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation.