Movatterモバイル変換


[0]ホーム

URL:


We bake cookies in your browser for a better experience. Using this site means that you consent.Read More

Menu

Qt Documentation

QSimpleXmlNodeModel Class

TheQSimpleXmlNodeModel class is an implementation ofQAbstractXmlNodeModel sufficient for many common cases.More...

Header:#include <QSimpleXmlNodeModel>
Since: Qt 4.4
Inherits:QAbstractXmlNodeModel

Note: All functions in this class arereentrant.

Public Functions

QSimpleXmlNodeModel(const QXmlNamePool & namePool)
virtual~QSimpleXmlNodeModel()
QXmlNamePool &namePool() const

Reimplemented Public Functions

virtual QUrlbaseUri(const QXmlNodeModelIndex & node) const
virtual QXmlNodeModelIndexelementById(const QXmlName & id) const
virtual QVector<QXmlName>namespaceBindings(const QXmlNodeModelIndex & node) const
virtual QVector<QXmlNodeModelIndex>nodesByIdref(const QXmlName & idref) const
virtual QStringstringValue(const QXmlNodeModelIndex & node) const

Additional Inherited Members

Detailed Description

TheQSimpleXmlNodeModel class is an implementation ofQAbstractXmlNodeModel sufficient for many common cases.

SubclassingQAbstractXmlNodeModel 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 ofQSimpleXmlNodeModel must be thread-safe.

Member Function Documentation

QSimpleXmlNodeModel::QSimpleXmlNodeModel(constQXmlNamePool & namePool)

Constructs aQSimpleXmlNodeModel for use with with the specifiednamePool.

[virtual]QSimpleXmlNodeModel::~QSimpleXmlNodeModel()

Destructor.

[virtual]QUrl QSimpleXmlNodeModel::baseUri(constQXmlNodeModelIndex & node) const

Reimplemented fromQAbstractXmlNodeModel::baseUri().

Returns the base URI fornode. This is always the document URI.

See alsodocumentUri().

[virtual]QXmlNodeModelIndex QSimpleXmlNodeModel::elementById(constQXmlName & id) const

Reimplemented fromQAbstractXmlNodeModel::elementById().

Always returns a default constructedQXmlNodeModelIndex instance, regardless ofid.

This effectively means the model has no elements that have an id.

QXmlNamePool & QSimpleXmlNodeModel::namePool() const

Returns the name pool associated with this model. The implementation ofname() will use this name pool to create names.

[virtual]QVector<QXmlName> QSimpleXmlNodeModel::namespaceBindings(constQXmlNodeModelIndex & node) const

Reimplemented fromQAbstractXmlNodeModel::namespaceBindings().

Always returns an emptyQVector. This signals that no namespace bindings are in scope fornode.

[virtual]QVector<QXmlNodeModelIndex> QSimpleXmlNodeModel::nodesByIdref(constQXmlName & idref) const

Reimplemented fromQAbstractXmlNodeModel::nodesByIdref().

Always returns an empty vector, regardless ofidref.

This effectively means the model has no elements or attributes of typeIDREF.

[virtual]QString QSimpleXmlNodeModel::stringValue(constQXmlNodeModelIndex & node) const

Reimplemented fromQAbstractXmlNodeModel::stringValue().

Ifnode is an element or attribute,typedValue() is called, and the return value converted to a string, as perXQuery's rules.

Ifnode 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 typexs:string) to ensure that the values are formatted according toXQuery.

© 2016 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of theGNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.


[8]ページ先頭

©2009-2025 Movatter.jp