1QXmlAttributes(3qt)                                        QXmlAttributes(3qt)
2
3
4

NAME

6       QXmlAttributes - XML attributes
7

SYNOPSIS

9       All the functions in this class are reentrant when Qt is built with
10       thread support.</p>
11
12       #include <qxml.h>
13
14   Public Members
15       QXmlAttributes ()
16       virtual ~QXmlAttributes ()
17       int index ( const QString & qName ) const
18       int index ( const QString & uri, const QString & localPart ) const
19       int length () const
20       int count () const
21       QString localName ( int index ) const
22       QString qName ( int index ) const
23       QString uri ( int index ) const
24       QString type ( int index ) const
25       QString type ( const QString & qName ) const
26       QString type ( const QString & uri, const QString & localName ) const
27       QString value ( int index ) const
28       QString value ( const QString & qName ) const
29       QString value ( const QString & uri, const QString & localName ) const
30       void clear ()
31       void append ( const QString & qName, const QString & uri, const QString
32           & localPart, const QString & value )
33

DESCRIPTION

35       The QXmlAttributes class provides XML attributes.
36
37       If attributes are reported by QXmlContentHandler::startElement() this
38       class is used to pass the attribute values.
39
40       Use index() to locate the position of an attribute in the list, count()
41       to retrieve the number of attributes, and clear() to remove the
42       attributes. New attributes can be added with append(). Use type() to
43       get an attribute's type and value() to get its value. The attribute's
44       name is available from localName() or qName(), and its namespace URI
45       from uri().
46
47       See also XML.
48

MEMBER FUNCTION DOCUMENTATION

QXmlAttributes::QXmlAttributes ()

51       Constructs an empty attribute list.
52

QXmlAttributes::~QXmlAttributes () [virtual]

54       Destroys the attributes object.
55

void QXmlAttributes::append ( const QString & qName, const QString & uri,

57       const QString & localPart, const QString & value )
58       Appends a new attribute entry to the list of attributes. The qualified
59       name of the attribute is qName, the namespace URI is uri and the local
60       name is localPart. The value of the attribute is value.
61
62       See also qName(), uri(), localName(), and value().
63

void QXmlAttributes::clear ()

65       Clears the list of attributes.
66
67       See also append().
68

int QXmlAttributes::count () const

70       Returns the number of attributes in the list. This function is
71       equivalent to length().
72

int QXmlAttributes::index ( const QString & qName ) const

74       Looks up the index of an attribute by the qualified name qName.
75
76       Returns the index of the attribute or -1 if it wasn't found.
77
78       See also the namespace description.
79

int QXmlAttributes::index ( const QString & uri, const QString & localPart )

81       const
82       This is an overloaded member function, provided for convenience. It
83       behaves essentially like the above function.
84
85       Looks up the index of an attribute by a namespace name.
86
87       uri specifies the namespace URI, or an empty string if the name has no
88       namespace URI. localPart specifies the attribute's local name.
89
90       Returns the index of the attribute, or -1 if it wasn't found.
91
92       See also the namespace description.
93

int QXmlAttributes::length () const

95       Returns the number of attributes in the list.
96
97       See also count().
98
99       Example: xml/tagreader-with-features/structureparser.cpp.
100

QString QXmlAttributes::localName ( int index ) const

102       Looks up an attribute's local name for the attribute at position index.
103       If no namespace processing is done, the local name is QString::null.
104
105       See also the namespace description.
106

QString QXmlAttributes::qName ( int index ) const

108       Looks up an attribute's XML 1.0 qualified name for the attribute at
109       position index.
110
111       See also the namespace description.
112
113       Example: xml/tagreader-with-features/structureparser.cpp.
114

QString QXmlAttributes::type ( int index ) const

116       Looks up an attribute's type for the attribute at position index.
117
118       Currently only "CDATA" is returned.
119

QString QXmlAttributes::type ( const QString & qName ) const

121       This is an overloaded member function, provided for convenience. It
122       behaves essentially like the above function.
123
124       Looks up an attribute's type for the qualified name qName.
125
126       Currently only "CDATA" is returned.
127

QString QXmlAttributes::type ( const QString & uri, const QString & localName

129       ) const
130       This is an overloaded member function, provided for convenience. It
131       behaves essentially like the above function.
132
133       Looks up an attribute's type by namespace name.
134
135       uri specifies the namespace URI and localName specifies the local name.
136       If the name has no namespace URI, use an empty string for uri.
137
138       Currently only "CDATA" is returned.
139

QString QXmlAttributes::uri ( int index ) const

141       Looks up an attribute's namespace URI for the attribute at position
142       index. If no namespace processing is done or if the attribute has no
143       namespace, the namespace URI is QString::null.
144
145       See also the namespace description.
146
147       Example: xml/tagreader-with-features/structureparser.cpp.
148

QString QXmlAttributes::value ( int index ) const

150       Looks up an attribute's value for the attribute at position index.
151

QString QXmlAttributes::value ( const QString & qName ) const

153       This is an overloaded member function, provided for convenience. It
154       behaves essentially like the above function.
155
156       Looks up an attribute's value for the qualified name qName.
157
158       See also the namespace description.
159

QString QXmlAttributes::value ( const QString & uri, const QString & localName

161       ) const
162       This is an overloaded member function, provided for convenience. It
163       behaves essentially like the above function.
164
165       Looks up an attribute's value by namespace name.
166
167       uri specifies the namespace URI, or an empty string if the name has no
168       namespace URI. localName specifies the attribute's local name.
169
170       See also the namespace description.
171
172

SEE ALSO

174       http://doc.trolltech.com/qxmlattributes.html
175       http://www.trolltech.com/faq/tech.html
176
178       Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com.  See the
179       license file included in the distribution for a complete license
180       statement.
181

AUTHOR

183       Generated automatically from the source code.
184

BUGS

186       If you find a bug in Qt, please report it as described in
187       http://doc.trolltech.com/bughowto.html.  Good bug reports help us to
188       help you. Thank you.
189
190       The definitive Qt documentation is provided in HTML format; it is
191       located at $QTDIR/doc/html and can be read using Qt Assistant or with a
192       web browser. This man page is provided as a convenience for those users
193       who prefer man pages, although this format is not officially supported
194       by Trolltech.
195
196       If you find errors in this manual page, please report them to qt-
197       bugs@trolltech.com.  Please include the name of the manual page
198       (qxmlattributes.3qt) and the Qt version (3.3.8).
199
200
201
202Trolltech AS                    2 February 2007            QXmlAttributes(3qt)
Impressum