Qt 4.8
qxmlstream.h
Go to the documentation of this file.
1 /****************************************************************************
2 **
3 ** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
4 ** Contact: http://www.qt-project.org/legal
5 **
6 ** This file is part of the QtCore module of the Qt Toolkit.
7 **
8 ** $QT_BEGIN_LICENSE:LGPL$
9 ** Commercial License Usage
10 ** Licensees holding valid commercial Qt licenses may use this file in
11 ** accordance with the commercial license agreement provided with the
12 ** Software or, alternatively, in accordance with the terms contained in
13 ** a written agreement between you and Digia. For licensing terms and
14 ** conditions see http://qt.digia.com/licensing. For further information
15 ** use the contact form at http://qt.digia.com/contact-us.
16 **
17 ** GNU Lesser General Public License Usage
18 ** Alternatively, this file may be used under the terms of the GNU Lesser
19 ** General Public License version 2.1 as published by the Free Software
20 ** Foundation and appearing in the file LICENSE.LGPL included in the
21 ** packaging of this file. Please review the following information to
22 ** ensure the GNU Lesser General Public License version 2.1 requirements
23 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
24 **
25 ** In addition, as a special exception, Digia gives you certain additional
26 ** rights. These rights are described in the Digia Qt LGPL Exception
27 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
28 **
29 ** GNU General Public License Usage
30 ** Alternatively, this file may be used under the terms of the GNU
31 ** General Public License version 3.0 as published by the Free Software
32 ** Foundation and appearing in the file LICENSE.GPL included in the
33 ** packaging of this file. Please review the following information to
34 ** ensure the GNU General Public License version 3.0 requirements will be
35 ** met: http://www.gnu.org/copyleft/gpl.html.
36 **
37 **
38 ** $QT_END_LICENSE$
39 **
40 ****************************************************************************/
41 
42 #ifndef QXMLSTREAM_H
43 #define QXMLSTREAM_H
44 
45 #include <QtCore/qiodevice.h>
46 
47 #ifndef QT_NO_XMLSTREAM
48 
49 #include <QtCore/qstring.h>
50 #include <QtCore/qvector.h>
51 #include <QtCore/qscopedpointer.h>
52 
54 
56 
57 QT_MODULE(Core)
58 
59 // QXmlStream* was originally in the QtXml module
60 // since we've moved it to QtCore in Qt 4.4.0, we need to
61 // keep binary compatibility
62 //
63 // The list of supported platforms is in:
64 // http://qt.nokia.com/doc/supported_platforms.html
65 //
66 // These platforms do not support symbol moving nor duplication
67 // (because duplicate symbols cause warnings when linking):
68 // Apple MacOS X (Mach-O executable format)
69 // special case: 64-bit on Mac wasn't supported before 4.5.0
70 // IBM AIX (XCOFF executable format)
71 //
72 // These platforms do not support symbol moving but allow it to be duplicated:
73 // Microsoft Windows (COFF PE executable format)
74 // special case: Windows CE wasn't supported before 4.4.0
75 //
76 // These platforms support symbol moving:
77 // HP HP-UX (PA-RISC2.0 shared executables)
78 // HP HP-UXi (ELF executable format)
79 // FreeBSD (ELF executable format)
80 // Linux (ELF executable format)
81 // SGI IRIX (ELF executable format)
82 // Sun Solaris (ELF executable format)
83 //
84 // Other platforms are supported through community contributions only.
85 // We are taking the optimist scenario here to avoid creating more
86 // symbols to be supported.
87 
88 #if defined(Q_OS_MAC32) || defined(Q_OS_AIX)
89 # if !defined QT_BUILD_XML_LIB
90 # define Q_XMLSTREAM_RENAME_SYMBOLS
91 # endif
92 #endif
93 
94 #if defined QT_BUILD_XML_LIB
95 # define Q_XMLSTREAM_EXPORT Q_XML_EXPORT
96 #else
97 # define Q_XMLSTREAM_EXPORT Q_CORE_EXPORT
98 #endif
99 
100 #if defined Q_XMLSTREAM_RENAME_SYMBOLS
101 // don't worry, we'll undef and change to typedef at the bottom of the file
102 # define QXmlStreamAttribute QCoreXmlStreamAttribute
103 # define QXmlStreamAttributes QCoreXmlStreamAttributes
104 # define QXmlStreamEntityDeclaration QCoreXmlStreamEntityDeclaration
105 # define QXmlStreamEntityDeclarations QCoreXmlStreamEntityDeclarations
106 # define QXmlStreamEntityResolver QCoreXmlStreamEntityResolver
107 # define QXmlStreamNamespaceDeclaration QCoreXmlStreamNamespaceDeclaration
108 # define QXmlStreamNamespaceDeclarations QCoreXmlStreamNamespaceDeclarations
109 # define QXmlStreamNotationDeclaration QCoreXmlStreamNotationDeclaration
110 # define QXmlStreamNotationDeclarations QCoreXmlStreamNotationDeclarations
111 # define QXmlStreamReader QCoreXmlStreamReader
112 # define QXmlStreamStringRef QCoreXmlStreamStringRef
113 # define QXmlStreamWriter QCoreXmlStreamWriter
114 #endif
115 
118  int m_position, m_size;
119 public:
120  inline QXmlStreamStringRef():m_position(0), m_size(0){}
121  inline QXmlStreamStringRef(const QStringRef &aString)
122  :m_string(aString.string()?*aString.string():QString()), m_position(aString.position()), m_size(aString.size()){}
123  inline QXmlStreamStringRef(const QString &aString):m_string(aString), m_position(0), m_size(aString.size()){}
125  inline void clear() { m_string.clear(); m_position = m_size = 0; }
126  inline operator QStringRef() const { return QStringRef(&m_string, m_position, m_size); }
127  inline const QString *string() const { return &m_string; }
128  inline int position() const { return m_position; }
129  inline int size() const { return m_size; }
130 };
131 
132 
136  QXmlStreamStringRef m_name, m_namespaceUri, m_qualifiedName, m_value;
137  void *reserved;
140  friend class QXmlStreamAttributes;
141 public:
144  QXmlStreamAttribute(const QString &namespaceUri, const QString &name, const QString &value);
148  inline QStringRef namespaceUri() const { return m_namespaceUri; }
149  inline QStringRef name() const { return m_name; }
150  inline QStringRef qualifiedName() const { return m_qualifiedName; }
151  inline QStringRef prefix() const {
152  return QStringRef(m_qualifiedName.string(),
153  m_qualifiedName.position(),
154  qMax(0, m_qualifiedName.size() - m_name.size() - 1));
155  }
156  inline QStringRef value() const { return m_value; }
157  inline bool isDefault() const { return m_isDefault; }
158  inline bool operator==(const QXmlStreamAttribute &other) const {
159  return (value() == other.value()
160  && (namespaceUri().isNull() ? (qualifiedName() == other.qualifiedName())
161  : (namespaceUri() == other.namespaceUri() && name() == other.name())));
162  }
163  inline bool operator!=(const QXmlStreamAttribute &other) const
164  { return !operator==(other); }
165 };
166 
168 
169 class Q_XMLSTREAM_EXPORT QXmlStreamAttributes : public QVector<QXmlStreamAttribute>
170 {
171 public:
173  QStringRef value(const QString &namespaceUri, const QString &name) const;
174  QStringRef value(const QString &namespaceUri, const QLatin1String &name) const;
175  QStringRef value(const QLatin1String &namespaceUri, const QLatin1String &name) const;
176  QStringRef value(const QString &qualifiedName) const;
177  QStringRef value(const QLatin1String &qualifiedName) const;
178  void append(const QString &namespaceUri, const QString &name, const QString &value);
179  void append(const QString &qualifiedName, const QString &value);
180 
181  inline bool hasAttribute(const QString &qualifiedName) const
182  {
183  return !value(qualifiedName).isNull();
184  }
185 
186  inline bool hasAttribute(const QLatin1String &qualifiedName) const
187  {
188  return !value(qualifiedName).isNull();
189  }
190 
191  inline bool hasAttribute(const QString &namespaceUri, const QString &name) const
192  {
193  return !value(namespaceUri, name).isNull();
194  }
195 
196 #if !defined(Q_NO_USING_KEYWORD)
198 #else
199  inline void append(const QXmlStreamAttribute &attribute)
201 #endif
202 };
203 
205  QXmlStreamStringRef m_prefix, m_namespaceUri;
206  void *reserved;
207 
209 public:
215  inline QStringRef prefix() const { return m_prefix; }
216  inline QStringRef namespaceUri() const { return m_namespaceUri; }
217  inline bool operator==(const QXmlStreamNamespaceDeclaration &other) const {
218  return (prefix() == other.prefix() && namespaceUri() == other.namespaceUri());
219  }
220  inline bool operator!=(const QXmlStreamNamespaceDeclaration &other) const
221  { return !operator==(other); }
222 };
223 
226 
228  QXmlStreamStringRef m_name, m_systemId, m_publicId;
229  void *reserved;
230 
232 public:
237  inline QStringRef name() const { return m_name; }
238  inline QStringRef systemId() const { return m_systemId; }
239  inline QStringRef publicId() const { return m_publicId; }
240  inline bool operator==(const QXmlStreamNotationDeclaration &other) const {
241  return (name() == other.name() && systemId() == other.systemId()
242  && publicId() == other.publicId());
243  }
244  inline bool operator!=(const QXmlStreamNotationDeclaration &other) const
245  { return !operator==(other); }
246 };
247 
250 
252  QXmlStreamStringRef m_name, m_notationName, m_systemId, m_publicId, m_value;
253  void *reserved;
254 
256 public:
261  inline QStringRef name() const { return m_name; }
262  inline QStringRef notationName() const { return m_notationName; }
263  inline QStringRef systemId() const { return m_systemId; }
264  inline QStringRef publicId() const { return m_publicId; }
265  inline QStringRef value() const { return m_value; }
266  inline bool operator==(const QXmlStreamEntityDeclaration &other) const {
267  return (name() == other.name()
268  && notationName() == other.notationName()
269  && systemId() == other.systemId()
270  && publicId() == other.publicId()
271  && value() == other.value());
272  }
273  inline bool operator!=(const QXmlStreamEntityDeclaration &other) const
274  { return !operator==(other); }
275 };
276 
279 
280 
282 {
283 public:
284  virtual ~QXmlStreamEntityResolver();
285  virtual QString resolveEntity(const QString& publicId, const QString& systemId);
286  virtual QString resolveUndeclaredEntity(const QString &name);
287 };
288 
289 #ifndef QT_NO_XMLSTREAMREADER
291  QDOC_PROPERTY(bool namespaceProcessing READ namespaceProcessing WRITE setNamespaceProcessing)
292 public:
293  enum TokenType {
294  NoToken = 0,
304  ProcessingInstruction
305  };
306 
307 
309  QXmlStreamReader(QIODevice *device);
311  QXmlStreamReader(const QString &data);
312  QXmlStreamReader(const char * data);
313  ~QXmlStreamReader();
314 
315  void setDevice(QIODevice *device);
316  QIODevice *device() const;
317  void addData(const QByteArray &data);
318  void addData(const QString &data);
319  void addData(const char *data);
320  void clear();
321 
322 
323  bool atEnd() const;
324  TokenType readNext();
325 
326  bool readNextStartElement();
327  void skipCurrentElement();
328 
329  TokenType tokenType() const;
330  QString tokenString() const;
331 
332  void setNamespaceProcessing(bool);
333  bool namespaceProcessing() const;
334 
335  inline bool isStartDocument() const { return tokenType() == StartDocument; }
336  inline bool isEndDocument() const { return tokenType() == EndDocument; }
337  inline bool isStartElement() const { return tokenType() == StartElement; }
338  inline bool isEndElement() const { return tokenType() == EndElement; }
339  inline bool isCharacters() const { return tokenType() == Characters; }
340  bool isWhitespace() const;
341  bool isCDATA() const;
342  inline bool isComment() const { return tokenType() == Comment; }
343  inline bool isDTD() const { return tokenType() == DTD; }
344  inline bool isEntityReference() const { return tokenType() == EntityReference; }
345  inline bool isProcessingInstruction() const { return tokenType() == ProcessingInstruction; }
346 
347  bool isStandaloneDocument() const;
348  QStringRef documentVersion() const;
349  QStringRef documentEncoding() const;
350 
351  qint64 lineNumber() const;
352  qint64 columnNumber() const;
353  qint64 characterOffset() const;
354 
355  QXmlStreamAttributes attributes() const;
356 
360  SkipChildElements
361  };
362  QString readElementText(ReadElementTextBehaviour behaviour);
363  QString readElementText();
364 
365  QStringRef name() const;
366  QStringRef namespaceUri() const;
367  QStringRef qualifiedName() const;
368  QStringRef prefix() const;
369 
370  QStringRef processingInstructionTarget() const;
371  QStringRef processingInstructionData() const;
372 
373  QStringRef text() const;
374 
375  QXmlStreamNamespaceDeclarations namespaceDeclarations() const;
376  void addExtraNamespaceDeclaration(const QXmlStreamNamespaceDeclaration &extraNamespaceDeclaraction);
377  void addExtraNamespaceDeclarations(const QXmlStreamNamespaceDeclarations &extraNamespaceDeclaractions);
378  QXmlStreamNotationDeclarations notationDeclarations() const;
379  QXmlStreamEntityDeclarations entityDeclarations() const;
380  QStringRef dtdName() const;
381  QStringRef dtdPublicId() const;
382  QStringRef dtdSystemId() const;
383 
384 
385  enum Error {
390  PrematureEndOfDocumentError
391  };
392  void raiseError(const QString& message = QString());
393  QString errorString() const;
394  Error error() const;
395 
396  inline bool hasError() const
397  {
398  return error() != NoError;
399  }
400 
401  void setEntityResolver(QXmlStreamEntityResolver *resolver);
402  QXmlStreamEntityResolver *entityResolver() const;
403 
404 private:
408 
409 };
410 #endif // QT_NO_XMLSTREAMREADER
411 
412 #ifndef QT_NO_XMLSTREAMWRITER
413 
415 
417 {
418  QDOC_PROPERTY(bool autoFormatting READ autoFormatting WRITE setAutoFormatting)
419  QDOC_PROPERTY(int autoFormattingIndent READ autoFormattingIndent WRITE setAutoFormattingIndent)
420 public:
422  QXmlStreamWriter(QIODevice *device);
424  QXmlStreamWriter(QString *string);
425  ~QXmlStreamWriter();
426 
427  void setDevice(QIODevice *device);
428  QIODevice *device() const;
429 
430 #ifndef QT_NO_TEXTCODEC
431  void setCodec(QTextCodec *codec);
432  void setCodec(const char *codecName);
433  QTextCodec *codec() const;
434 #endif
435 
436  void setAutoFormatting(bool);
437  bool autoFormatting() const;
438 
439  void setAutoFormattingIndent(int spacesOrTabs);
440  int autoFormattingIndent() const;
441 
442  void writeAttribute(const QString &qualifiedName, const QString &value);
443  void writeAttribute(const QString &namespaceUri, const QString &name, const QString &value);
444  void writeAttribute(const QXmlStreamAttribute& attribute);
445  void writeAttributes(const QXmlStreamAttributes& attributes);
446 
447  void writeCDATA(const QString &text);
448  void writeCharacters(const QString &text);
449  void writeComment(const QString &text);
450 
451  void writeDTD(const QString &dtd);
452 
453  void writeEmptyElement(const QString &qualifiedName);
454  void writeEmptyElement(const QString &namespaceUri, const QString &name);
455 
456  void writeTextElement(const QString &qualifiedName, const QString &text);
457  void writeTextElement(const QString &namespaceUri, const QString &name, const QString &text);
458 
459  void writeEndDocument();
460  void writeEndElement();
461 
462  void writeEntityReference(const QString &name);
463  void writeNamespace(const QString &namespaceUri, const QString &prefix = QString());
464  void writeDefaultNamespace(const QString &namespaceUri);
465  void writeProcessingInstruction(const QString &target, const QString &data = QString());
466 
467  void writeStartDocument();
468  void writeStartDocument(const QString &version);
469  void writeStartDocument(const QString &version, bool standalone);
470  void writeStartElement(const QString &qualifiedName);
471  void writeStartElement(const QString &namespaceUri, const QString &name);
472 
473 #ifndef QT_NO_XMLSTREAMREADER
474  void writeCurrentToken(const QXmlStreamReader &reader);
475 #endif
476 
477  bool hasError() const;
478 
479 private:
483 };
484 #endif // QT_NO_XMLSTREAMWRITER
485 
487 
489 
490 #endif // QT_NO_XMLSTREAM
491 #endif // QXMLSTREAM_H
The QXmlStreamWriter class provides an XML writer with a simple streaming API.
Definition: qxmlstream.h:416
bool isEndDocument() const
Returns true if tokenType() equals EndDocument ; otherwise returns false.
Definition: qxmlstream.h:336
#define QT_END_NAMESPACE
This macro expands to.
Definition: qglobal.h:90
QVector< QXmlStreamNamespaceDeclaration > QXmlStreamNamespaceDeclarations
Definition: qxmlstream.h:225
#define QDOC_PROPERTY(text)
Definition: qglobal.h:2503
bool operator==(const QXmlStreamEntityDeclaration &other) const
Compares this entity declaration with other and returns true if they are equal; otherwise returns fal...
Definition: qxmlstream.h:266
#define QT_MODULE(x)
Definition: qglobal.h:2783
QStringRef systemId() const
Returns the system identifier.
Definition: qxmlstream.h:263
#define QT_BEGIN_HEADER
Definition: qglobal.h:136
The QXmlStreamEntityDeclaration class represents a DTD entity declaration.
Definition: qxmlstream.h:251
#define error(msg)
bool operator!=(const QXmlStreamNamespaceDeclaration &other) const
Compares this namespace declaration with other and returns true if they are not equal; otherwise retu...
Definition: qxmlstream.h:220
The QByteArray class provides an array of bytes.
Definition: qbytearray.h:135
The QXmlStreamNotationDeclaration class represents a DTD notation declaration.
Definition: qxmlstream.h:227
static qreal position(QGraphicsObject *item, QDeclarativeAnchorLine::AnchorLine anchorLine)
QStringRef value() const
Returns the attribute&#39;s value.
Definition: qxmlstream.h:156
static void clear(QVariant::Private *d)
Definition: qvariant.cpp:197
bool isEndElement() const
Returns true if tokenType() equals EndElement ; otherwise returns false.
Definition: qxmlstream.h:338
static bool isWhitespace(char c)
int position() const
Definition: qxmlstream.h:128
#define Q_DISABLE_COPY(Class)
Disables the use of copy constructors and assignment operators for the given Class.
Definition: qglobal.h:2523
const QString * string() const
Definition: qxmlstream.h:127
The QString class provides a Unicode character string.
Definition: qstring.h:83
bool isStartDocument() const
Returns true if tokenType() equals StartDocument ; otherwise returns false.
Definition: qxmlstream.h:335
The QVector class is a template class that provides a dynamic array.
Definition: qdatastream.h:64
TokenType
This enum specifies the type of token the reader just read.
Definition: qxmlstream.h:293
bool isCharacters() const
Returns true if tokenType() equals Characters ; otherwise returns false.
Definition: qxmlstream.h:339
QStringRef qualifiedName() const
Returns the attribute&#39;s qualified name.
Definition: qxmlstream.h:150
static QByteArray qualifiedName(const QMetaEnum &e)
bool operator==(const QXmlStreamAttribute &other) const
Compares this attribute with other and returns true if they are equal; otherwise returns false...
Definition: qxmlstream.h:158
QXmlStreamStringRef m_value
Definition: qxmlstream.h:136
bool operator==(const QXmlStreamNamespaceDeclaration &other) const
Compares this namespace declaration with other and returns true if they are equal; otherwise returns ...
Definition: qxmlstream.h:217
bool hasAttribute(const QString &qualifiedName) const
Definition: qxmlstream.h:181
Q_DECL_CONSTEXPR const T & qMax(const T &a, const T &b)
Definition: qglobal.h:1217
bool operator!=(const QXmlStreamNotationDeclaration &other) const
Compares this notation declaration with other and returns true if they are not equal; otherwise retur...
Definition: qxmlstream.h:244
The QScopedPointer class stores a pointer to a dynamically allocated object, and deletes it upon dest...
QStringRef 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.
Q_GUI_EXPORT QString errorString(EGLint code=eglGetError())
Definition: qegl.cpp:743
bool isComment() const
Returns true if tokenType() equals Comment ; otherwise returns false.
Definition: qxmlstream.h:342
The QXmlStreamAttribute class represents a single XML attribute.
Definition: qxmlstream.h:135
#define QT_BEGIN_NAMESPACE
This macro expands to.
Definition: qglobal.h:89
QStringRef publicId() const
Returns the public identifier.
Definition: qxmlstream.h:239
QStringRef systemId() const
Returns the system identifier.
Definition: qxmlstream.h:238
bool operator!=(const QXmlStreamAttribute &other) const
Compares this attribute with other and returns true if they are not equal; otherwise returns false...
Definition: qxmlstream.h:163
The QXmlStreamEntityResolver class provides an entity resolver for a QXmlStreamReader.
Definition: qxmlstream.h:281
QXmlStreamStringRef(const QStringRef &aString)
Definition: qxmlstream.h:121
T value(int i) const
Returns the value at index position i in the vector.
Definition: qvector.h:559
QXmlStreamStringRef m_systemId
Definition: qxmlstream.h:228
ReadElementTextBehaviour
This enum specifies the different behaviours of readElementText().
Definition: qxmlstream.h:357
const char * name
bool hasError() const
Returns true if an error has occurred, otherwise false.
Definition: qxmlstream.h:396
bool isEntityReference() const
Returns true if tokenType() equals EntityReference ; otherwise returns false.
Definition: qxmlstream.h:344
void append(const T &t)
Inserts value at the end of the vector.
Definition: qvector.h:573
static const char * data(const QByteArray &arr)
unsigned int uint
Definition: qglobal.h:996
The QLatin1String class provides a thin wrapper around an US-ASCII/Latin-1 encoded string literal...
Definition: qstring.h:654
static QTextCodec * codec(MYSQL *mysql)
Definition: qsql_mysql.cpp:220
QStringRef namespaceUri() const
Returns the namespaceUri.
Definition: qxmlstream.h:216
QStringRef prefix() const
Returns the prefix.
Definition: qxmlstream.h:215
QXmlStreamStringRef(const QString &aString)
Definition: qxmlstream.h:123
QVector< QXmlStreamAttribute > & operator=(const QVector< QXmlStreamAttribute > &v)
Assigns other to this vector and returns a reference to this vector.
Definition: qvector.h:390
QStringRef name() const
Returns the attribute&#39;s local name.
Definition: qxmlstream.h:149
__int64 qint64
Definition: qglobal.h:942
bool hasAttribute(const QLatin1String &qualifiedName) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
Definition: qxmlstream.h:186
handler setDevice(device)
QVector< QXmlStreamNotationDeclaration > QXmlStreamNotationDeclarations
Definition: qxmlstream.h:249
bool operator!=(const QXmlStreamEntityDeclaration &other) const
Compares this entity declaration with other and returns true if they are not equal; otherwise returns...
Definition: qxmlstream.h:273
int size() const
Definition: qxmlstream.h:129
The QStringRef class provides a thin wrapper around QString substrings.
Definition: qstring.h:1099
bool isStartElement() const
Returns true if tokenType() equals StartElement ; otherwise returns false.
Definition: qxmlstream.h:337
QStringRef name() const
Returns the notation name.
Definition: qxmlstream.h:237
static QChar resolveEntity(const QString &entity)
The QXmlStreamNamespaceDeclaration class represents a namespace declaration.
Definition: qxmlstream.h:204
bool isDTD() const
Returns true if tokenType() equals DTD ; otherwise returns false.
Definition: qxmlstream.h:343
The QXmlStreamAttributes class represents a vector of QXmlStreamAttribute.
Definition: qxmlstream.h:169
void clear()
Clears the contents of the string and makes it empty.
Definition: qstring.h:723
bool operator==(const QXmlStreamNotationDeclaration &other) const
Compares this notation declaration with other and returns true if they are equal; otherwise returns f...
Definition: qxmlstream.h:240
bool isDefault() const
Returns true if the parser added this attribute with a default value following an ATTLIST declaration...
Definition: qxmlstream.h:157
QStringRef notationName() const
Returns the notation name.
Definition: qxmlstream.h:262
Error
This enum specifies different error cases.
Definition: qxmlstream.h:385
QVector< QXmlStreamEntityDeclaration > QXmlStreamEntityDeclarations
Definition: qxmlstream.h:278
QXmlStreamStringRef m_value
Definition: qxmlstream.h:252
QStringRef prefix() const
Returns the attribute&#39;s namespace prefix.
Definition: qxmlstream.h:151
QStringRef name() const
Returns the entity name.
Definition: qxmlstream.h:261
QStringRef publicId() const
Returns the public identifier.
Definition: qxmlstream.h:264
QXmlStreamStringRef m_prefix
Definition: qxmlstream.h:205
#define Q_DECLARE_PRIVATE(Class)
Definition: qglobal.h:2467
QStringRef value() const
Returns the entity&#39;s value.
Definition: qxmlstream.h:265
The QXmlStreamReader class provides a fast parser for reading well-formed XML via a simple streaming ...
Definition: qxmlstream.h:290
Q_DECLARE_TYPEINFO(QXmlStreamAttribute, Q_MOVABLE_TYPE)
The QTextCodec class provides conversions between text encodings.
Definition: qtextcodec.h:62
The QIODevice class is the base interface class of all I/O devices in Qt.
Definition: qiodevice.h:66
bool hasAttribute(const QString &namespaceUri, const QString &name) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
Definition: qxmlstream.h:191
#define QT_END_HEADER
Definition: qglobal.h:137
#define Q_XMLSTREAM_EXPORT
Definition: qxmlstream.h:97
bool operator==(QBool b1, bool b2)
Definition: qglobal.h:2023
bool isProcessingInstruction() const
Returns true if tokenType() equals ProcessingInstruction ; otherwise returns false.
Definition: qxmlstream.h:345
#define text
Definition: qobjectdefs.h:80
QStringRef namespaceUri() const
Returns the attribute&#39;s resolved namespaceUri, or an empty string reference if the attribute does not...
Definition: qxmlstream.h:148