47 #ifndef QT_NO_XMLSTREAM
88 #if defined(Q_OS_MAC32) || defined(Q_OS_AIX)
89 # if !defined QT_BUILD_XML_LIB
90 # define Q_XMLSTREAM_RENAME_SYMBOLS
94 #if defined QT_BUILD_XML_LIB
95 # define Q_XMLSTREAM_EXPORT Q_XML_EXPORT
97 # define Q_XMLSTREAM_EXPORT Q_CORE_EXPORT
100 #if defined Q_XMLSTREAM_RENAME_SYMBOLS
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
118 int m_position, m_size;
122 :m_string(aString.
string()?*aString.
string():
QString()), m_position(aString.position()), m_size(aString.
size()){}
125 inline void clear() { m_string.clear(); m_position = m_size = 0; }
129 inline int size()
const {
return m_size; }
133 class QXmlStreamReaderPrivate;
138 uint m_isDefault : 1;
139 friend class QXmlStreamReaderPrivate;
153 m_qualifiedName.position(),
154 qMax(0, m_qualifiedName.size() - m_name.size() - 1));
160 && (namespaceUri().isNull() ? (qualifiedName() == other.
qualifiedName())
183 return !
value(qualifiedName).isNull();
188 return !
value(qualifiedName).isNull();
193 return !
value(namespaceUri, name).isNull();
196 #if !defined(Q_NO_USING_KEYWORD)
208 friend class QXmlStreamReaderPrivate;
231 friend class QXmlStreamReaderPrivate;
255 friend class QXmlStreamReaderPrivate;
289 #ifndef QT_NO_XMLSTREAMREADER
291 QDOC_PROPERTY(
bool namespaceProcessing READ namespaceProcessing WRITE setNamespaceProcessing)
304 ProcessingInstruction
319 void addData(
const char *
data);
324 TokenType readNext();
326 bool readNextStartElement();
327 void skipCurrentElement();
329 TokenType tokenType()
const;
332 void setNamespaceProcessing(
bool);
333 bool namespaceProcessing()
const;
340 bool isWhitespace()
const;
341 bool isCDATA()
const;
342 inline bool isComment()
const {
return tokenType() == Comment; }
343 inline bool isDTD()
const {
return tokenType() == DTD; }
347 bool isStandaloneDocument()
const;
351 qint64 lineNumber()
const;
352 qint64 columnNumber()
const;
353 qint64 characterOffset()
const;
362 QString readElementText(ReadElementTextBehaviour behaviour);
370 QStringRef processingInstructionTarget()
const;
375 QXmlStreamNamespaceDeclarations namespaceDeclarations()
const;
377 void addExtraNamespaceDeclarations(
const QXmlStreamNamespaceDeclarations &extraNamespaceDeclaractions);
378 QXmlStreamNotationDeclarations notationDeclarations()
const;
379 QXmlStreamEntityDeclarations entityDeclarations()
const;
390 PrematureEndOfDocumentError
410 #endif // QT_NO_XMLSTREAMREADER
412 #ifndef QT_NO_XMLSTREAMWRITER
414 class QXmlStreamWriterPrivate;
418 QDOC_PROPERTY(
bool autoFormatting READ autoFormatting WRITE setAutoFormatting)
419 QDOC_PROPERTY(
int autoFormattingIndent READ autoFormattingIndent WRITE setAutoFormattingIndent)
430 #ifndef QT_NO_TEXTCODEC
432 void setCodec(
const char *codecName);
436 void setAutoFormatting(
bool);
437 bool autoFormatting()
const;
439 void setAutoFormattingIndent(
int spacesOrTabs);
440 int autoFormattingIndent()
const;
447 void writeCDATA(
const QString &text);
448 void writeCharacters(
const QString &text);
449 void writeComment(
const QString &text);
451 void writeDTD(
const QString &dtd);
453 void writeEmptyElement(
const QString &qualifiedName);
454 void writeEmptyElement(
const QString &namespaceUri,
const QString &name);
456 void writeTextElement(
const QString &qualifiedName,
const QString &text);
459 void writeEndDocument();
460 void writeEndElement();
462 void writeEntityReference(
const QString &name);
464 void writeDefaultNamespace(
const QString &namespaceUri);
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);
473 #ifndef QT_NO_XMLSTREAMREADER
477 bool hasError()
const;
484 #endif // QT_NO_XMLSTREAMWRITER
490 #endif // QT_NO_XMLSTREAM
491 #endif // QXMLSTREAM_H
bool isStartDocument() const
QStringRef prefix() const
bool operator!=(const QXmlStreamNotationDeclaration &other) const
QVector< QXmlStreamNamespaceDeclaration > QXmlStreamNamespaceDeclarations
const QString * string() const
Q_DECLARE_TYPEINFO(QXmlStreamAttribute, Q_MOVABLE_TYPE)
QVector< QXmlStreamNotationDeclaration > QXmlStreamNotationDeclarations
QStringRef prefix() const
bool operator!=(const QXmlStreamEntityDeclaration &other) const
bool isEndDocument() const
#define Q_XMLSTREAM_EXPORT
bool isStartElement() const
bool hasAttribute(const QString &namespaceUri, const QString &name) const
bool operator==(const Attribute &cA, const AttributeInstance< type > &cB)
This operator compares the two attributes and NOT their values.
#define QT_BEGIN_NAMESPACE
GLsizei GLsizei GLenum GLenum const GLvoid * data
bool isEndElement() const
GLsizei const GLchar ** string
bool isCharacters() const
QVector< QXmlStreamAttribute > & operator=(const QVector< QXmlStreamAttribute > &v)
bool operator!=(const QXmlStreamNamespaceDeclaration &other) const
bool operator==(const QXmlStreamNotationDeclaration &other) const
QXmlStreamStringRef(const QStringRef &aString)
bool operator==(const QXmlStreamNamespaceDeclaration &other) const
QStringRef qualifiedName() const
QVector< QXmlStreamEntityDeclaration > QXmlStreamEntityDeclarations
GLsizei const GLfloat * value
bool hasAttribute(const QString &qualifiedName) const
bool isProcessingInstruction() const
QStringRef notationName() const
GLuint const GLchar * name
bool hasAttribute(const QLatin1String &qualifiedName) const
QStringRef systemId() const
bool operator!=(const QXmlStreamAttribute &other) const
bool isEntityReference() const
QStringRef publicId() const
bool operator==(const QXmlStreamAttribute &other) const
QStringRef publicId() const
GLXFBConfig int attribute
bool operator==(const QXmlStreamEntityDeclaration &other) const
QStringRef namespaceUri() const
QStringRef namespaceUri() const
QXmlStreamStringRef(const QString &aString)
QStringRef systemId() const