Qt:Документация 4.3.2/qxmlstreamattributes

Материал из Wiki.crossplatform.ru

Перейти к: навигация, поиск
40px Внимание: Актуальная версия перевода документации находится здесь

__NOTOC__

Image:qt-logo.png

Главная · Все классы · Основные классы · Классы по группам · Модули · Функции

Image:trolltech-logo.png

Содержание

[править] QXmlStreamAttributes Class Reference
[модуль QtXml ]

The QXmlStreamAttributes class represents a vector of QXmlStreamAttribute. More...

 #include <QXmlStreamAttributes>

Inherits QVector<QXmlStreamAttribute>.

Note: All the functions in this class are reentrant.

This class was introduced in Qt 4.3.

[править] Открытые функции

  • void append ( const QString & namespaceUri, const QString & name, const QString & value )
  • void append ( const QXmlStreamAttribute & attribute )
  • void append ( const QString & qualifiedName, const QString & value )
  • QStringRef value ( const QString & namespaceUri, const QString & name ) const
  • QStringRef value ( const QString & namespaceUri, const QLatin1String & name ) const
  • QStringRef value ( const QLatin1String & namespaceUri, const QLatin1String & name ) const
  • QStringRef value ( const QString & qualifiedName ) const
  • QStringRef value ( const QLatin1String & qualifiedName ) const
  • 62 открытых функций унаследованных от QVector

[править] Дополнительные унаследованные члены

  • 2 статических открытых члена унаследованных от QVector

[править] Подробное описание

The QXmlStreamAttributes class represents a vector of QXmlStreamAttribute.

Attributes are returned by a QXmlStreamReader in attributes() when the reader reports a start element. The class can also be used with a QXmlStreamWriter as an argument to writeAttributes().

The convenience function value() loops over the vector and returns an attribute value for a given namespaceUri and an attribute's name.

New attributes can be added with append().


[править] Описание функций-членов

[править]
void QXmlStreamAttributes::append ( const QString & namespaceUri, const QString & name, const QString & value )

Appends a new attribute with name in the namespace described with namespaceUri, and value value. The namespaceUri can be empty.

[править]
void QXmlStreamAttributes::append ( const QXmlStreamAttribute & attribute )

This is an overloaded member function, provided for convenience.

Appends the given attribute to the end of the vector.

See also QVector::append().

[править]
void QXmlStreamAttributes::append ( const QString & qualifiedName, const QString & value )

This is an overloaded member function, provided for convenience.

Appends a new attribute with qualified name qualifiedName and value value.

[править]
QStringRef QXmlStreamAttributes::value ( const QString & namespaceUri, const QString & name ) const

Returns the value of the attribute name in the namespace described with namespaceUri, or an empty string reference if the attribute is not defined. The namespaceUri can be empty.

[править]
QStringRef QXmlStreamAttributes::value ( const QString & namespaceUri, const QLatin1String & name ) const

This is an overloaded member function, provided for convenience.

Returns the value of the attribute name in the namespace described with namespaceUri, or an empty string reference if the attribute is not defined. The namespaceUri can be empty.

[править]
QStringRef QXmlStreamAttributes::value ( const QLatin1String & namespaceUri, const QLatin1String & name ) const

This is an overloaded member function, provided for convenience.

Returns the value of the attribute name in the namespace described with namespaceUri, or an empty string reference if the attribute is not defined. The namespaceUri can be empty.

[править]
QStringRef QXmlStreamAttributes::value ( const QString & qualifiedName ) const

This is an overloaded member function, provided for convenience.

Returns the value of the attribute with qualified name qualifiedName , or an empty string reference if the attribute is not defined. A qualified name is the raw name of an attribute in the XML data. It consists of the namespace prefix, followed by colon, followed by the attribute's local name. Since the namespace prefix is not unique (the same prefix can point to different namespaces and different prefixes can point to the same namespace), you shouldn't use qualified names, but a resolved namespaceUri and the attribute's local name.

[править]
QStringRef QXmlStreamAttributes::value ( const QLatin1String & qualifiedName ) const

This is an overloaded member function, provided for convenience.

Returns the value of the attribute with qualified name qualifiedName , or an empty string reference if the attribute is not defined. A qualified name is the raw name of an attribute in the XML data. It consists of the namespace prefix, followed by colon, followed by the attribute's local name. Since the namespace prefix is not unique (the same prefix can point to different namespaces and different prefixes can point to the same namespace), you shouldn't use qualified names, but a resolved namespaceUri and the attribute's local name.


Copyright © 2007 Trolltech Trademarks
Qt 4.3.2