Qt 4.8
|
The QXmlStreamAttribute class represents a single XML attribute. More...
#include <qxmlstream.h>
Public Functions | |
bool | isDefault () const |
Returns true if the parser added this attribute with a default value following an ATTLIST declaration in the DTD; otherwise returns false. More... | |
QStringRef | name () const |
Returns the attribute's local name. More... | |
QStringRef | namespaceUri () const |
Returns the attribute's resolved namespaceUri, or an empty string reference if the attribute does not have a defined namespace. More... | |
bool | operator!= (const QXmlStreamAttribute &other) const |
Compares this attribute with other and returns true if they are not equal; otherwise returns false. More... | |
QXmlStreamAttribute & | operator= (const QXmlStreamAttribute &) |
Assigns other to this attribute. More... | |
bool | operator== (const QXmlStreamAttribute &other) const |
Compares this attribute with other and returns true if they are equal; otherwise returns false. More... | |
QStringRef | prefix () const |
Returns the attribute's namespace prefix. More... | |
QStringRef | qualifiedName () const |
Returns the attribute's qualified name. More... | |
QXmlStreamAttribute () | |
Creates an empty attribute. More... | |
QXmlStreamAttribute (const QString &qualifiedName, const QString &value) | |
Constructs an attribute with qualified name qualifiedName and value value. More... | |
QXmlStreamAttribute (const QString &namespaceUri, const QString &name, const QString &value) | |
Constructs an attribute in the namespace described with namespaceUri with name and value value. More... | |
QXmlStreamAttribute (const QXmlStreamAttribute &) | |
Creates a copy of other. More... | |
QStringRef | value () const |
Returns the attribute's value. More... | |
~QXmlStreamAttribute () | |
Destructs an attribute. More... | |
Properties | |
uint | m_isDefault: 1 |
QXmlStreamStringRef | m_name |
QXmlStreamStringRef | m_namespaceUri |
QXmlStreamStringRef | m_qualifiedName |
QXmlStreamStringRef | m_value |
void * | reserved |
Friends | |
class | QXmlStreamAttributes |
class | QXmlStreamReaderPrivate |
The QXmlStreamAttribute class represents a single XML attribute.
An attribute consists of an optionally empty namespaceUri(), a name(), a value(), and an isDefault() attribute.
The raw XML attribute name is returned as qualifiedName().
Definition at line 135 of file qxmlstream.h.
QXmlStreamAttribute::QXmlStreamAttribute | ( | ) |
Constructs an attribute with qualified name qualifiedName and value value.
Definition at line 2371 of file qxmlstream.cpp.
QXmlStreamAttribute::QXmlStreamAttribute | ( | const QString & | namespaceUri, |
const QString & | name, | ||
const QString & | value | ||
) |
Constructs an attribute in the namespace described with namespaceUri with name and value value.
Definition at line 2360 of file qxmlstream.cpp.
QXmlStreamAttribute::QXmlStreamAttribute | ( | const QXmlStreamAttribute & | other | ) |
Creates a copy of other.
Definition at line 2458 of file qxmlstream.cpp.
QXmlStreamAttribute::~QXmlStreamAttribute | ( | ) |
|
inline |
Returns true if the parser added this attribute with a default value following an ATTLIST declaration in the DTD; otherwise returns false.
Definition at line 157 of file qxmlstream.h.
|
inline |
Returns the attribute's local name.
Definition at line 149 of file qxmlstream.h.
Referenced by QPatternist::XSLTTokenizer::handleStandardAttributes(), QPatternist::XSLTTokenizer::handleValidationAttributes(), Document::load(), operator==(), QPatternist::XSLTTokenizer::readAlternativeAttribute(), QXmlStreamReaderPrivate::resolveTag(), QPatternist::AccelTreeResourceLoader::streamToReceiver(), QPatternist::MaintainingReader< XSLTTokenLookup >::validateElement(), QXmlStreamAttributes::value(), and QXmlStreamWriter::writeAttribute().
|
inline |
Returns the attribute's resolved namespaceUri, or an empty string reference if the attribute does not have a defined namespace.
Definition at line 148 of file qxmlstream.h.
Referenced by QPatternist::XSLTTokenizer::handleStandardAttributes(), QPatternist::XSLTTokenizer::handleValidationAttributes(), QPatternist::XSLTTokenizer::insideSequenceConstructor(), Document::load(), operator==(), QXmlStreamReaderPrivate::resolveTag(), QPatternist::AccelTreeResourceLoader::streamToReceiver(), QPatternist::MaintainingReader< XSLTTokenLookup >::validateElement(), QXmlStreamAttributes::value(), and QXmlStreamWriter::writeAttribute().
|
inline |
Compares this attribute with other and returns true if they are not equal; otherwise returns false.
Definition at line 163 of file qxmlstream.h.
QXmlStreamAttribute & QXmlStreamAttribute::operator= | ( | const QXmlStreamAttribute & | other | ) |
|
inline |
Compares this attribute with other and returns true if they are equal; otherwise returns false.
Definition at line 158 of file qxmlstream.h.
|
inline |
Returns the attribute's namespace prefix.
Definition at line 151 of file qxmlstream.h.
Referenced by QPatternist::XSLTTokenizer::insideSequenceConstructor(), and QPatternist::AccelTreeResourceLoader::streamToReceiver().
|
inline |
Returns the attribute's qualified name.
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 qualifiedName(), but the resolved namespaceUri() and the attribute's local name().
Definition at line 150 of file qxmlstream.h.
Referenced by QPatternist::XSLTTokenizer::handleStandardAttributes(), QPatternist::XSLTTokenizer::insideSequenceConstructor(), operator==(), parseCoreNode(), QSvgAttributes::QSvgAttributes(), QXmlStreamReaderPrivate::resolveTag(), QXmlStreamAttributes::value(), and QXmlStreamWriter::writeAttribute().
|
inline |
Returns the attribute's value.
Definition at line 156 of file qxmlstream.h.
Referenced by QPatternist::XSLTTokenizer::insideSequenceConstructor(), Document::load(), operator==(), parseCoreNode(), QSvgAttributes::QSvgAttributes(), QPatternist::XSLTTokenizer::readAlternativeAttribute(), QPatternist::AccelTreeResourceLoader::streamToReceiver(), QXmlStreamAttributes::value(), and QXmlStreamWriter::writeAttribute().
|
friend |
Definition at line 140 of file qxmlstream.h.
|
friend |
Definition at line 139 of file qxmlstream.h.
|
private |
Definition at line 138 of file qxmlstream.h.
Referenced by operator=(), and QXmlStreamReaderPrivate::resolveTag().
|
private |
Definition at line 136 of file qxmlstream.h.
Referenced by operator=(), and QXmlStreamReaderPrivate::resolveTag().
|
private |
Definition at line 136 of file qxmlstream.h.
Referenced by operator=(), and QXmlStreamReaderPrivate::resolveTag().
|
private |
Definition at line 136 of file qxmlstream.h.
Referenced by operator=(), and QXmlStreamReaderPrivate::resolveTag().
|
private |
Definition at line 136 of file qxmlstream.h.
Referenced by operator=(), and QXmlStreamReaderPrivate::resolveTag().
|
private |
Definition at line 137 of file qxmlstream.h.