Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
qdom.cpp File Reference
#include <qplatformdefs.h>
#include <qdom.h>
#include "private/qxmlutils_p.h"
#include "qdom_p.h"
#include "qdomhelpers_p.h"
#include <qatomic.h>
#include <qbuffer.h>
#include <qiodevice.h>
#include <qtextstream.h>
#include <qvariant.h>
#include <qshareddata.h>
#include <qdebug.h>
#include <qxmlstream.h>
#include <private/qduplicatetracker_p.h>
#include <private/qstringiterator_p.h>
#include <qvarlengtharray.h>
#include <stdio.h>
#include <limits>
#include <memory>
+ Include dependency graph for qdom.cpp:

Go to the source code of this file.

Macros

#define IMPL   static_cast<QDomNodePrivate *>(impl)
 
#define IMPL   static_cast<QDomNamedNodeMapPrivate *>(impl)
 
#define IMPL   static_cast<QDomDocumentTypePrivate *>(impl)
 
#define IMPL   static_cast<QDomCharacterDataPrivate *>(impl)
 
#define IMPL   static_cast<QDomAttrPrivate *>(impl)
 
#define IMPL   static_cast<QDomElementPrivate *>(impl)
 
#define IMPL   static_cast<QDomTextPrivate *>(impl)
 
#define IMPL   static_cast<QDomNotationPrivate *>(impl)
 
#define IMPL   static_cast<QDomEntityPrivate *>(impl)
 
#define IMPL   static_cast<QDomDocumentPrivate *>(impl)
 

Functions

static void qt_split_namespace (QString &prefix, QString &name, const QString &qName, bool hasURI)
 
static QString fixedXmlName (const QString &_name, bool *ok, bool namespaces=false)
 
static QString fixedCharData (const QString &data, bool *ok)
 
static QString fixedComment (const QString &data, bool *ok)
 
static QString fixedCDataSection (const QString &data, bool *ok)
 
static QString fixedPIData (const QString &data, bool *ok)
 
static QString fixedPubidLiteral (const QString &data, bool *ok)
 
static QString fixedSystemLiteral (const QString &data, bool *ok)
 
static void qNormalizeNode (QDomNodePrivate *n)
 
static QString quotedValue (const QString &data)
 
static QString encodeText (const QString &str, const bool encodeQuotes=true, const bool performAVN=false, const bool encodeEOLs=false)
 
static QByteArray encodeEntity (const QByteArray &str)
 

Macro Definition Documentation

◆ IMPL [1/10]

#define IMPL   static_cast<QDomNodePrivate *>(impl)

Definition at line 1382 of file qdom.cpp.

◆ IMPL [2/10]

#define IMPL   static_cast<QDomNamedNodeMapPrivate *>(impl)

Definition at line 1382 of file qdom.cpp.

◆ IMPL [3/10]

#define IMPL   static_cast<QDomDocumentTypePrivate *>(impl)

Definition at line 1382 of file qdom.cpp.

◆ IMPL [4/10]

#define IMPL   static_cast<QDomCharacterDataPrivate *>(impl)

Definition at line 1382 of file qdom.cpp.

◆ IMPL [5/10]

#define IMPL   static_cast<QDomAttrPrivate *>(impl)

Definition at line 1382 of file qdom.cpp.

◆ IMPL [6/10]

#define IMPL   static_cast<QDomElementPrivate *>(impl)

Definition at line 1382 of file qdom.cpp.

◆ IMPL [7/10]

#define IMPL   static_cast<QDomTextPrivate *>(impl)

Definition at line 1382 of file qdom.cpp.

◆ IMPL [8/10]

#define IMPL   static_cast<QDomNotationPrivate *>(impl)

Definition at line 1382 of file qdom.cpp.

◆ IMPL [9/10]

#define IMPL   static_cast<QDomEntityPrivate *>(impl)

Definition at line 1382 of file qdom.cpp.

◆ IMPL [10/10]

#define IMPL   static_cast<QDomDocumentPrivate *>(impl)

Definition at line 1382 of file qdom.cpp.

Function Documentation

◆ encodeEntity()

static QByteArray encodeEntity ( const QByteArray str)
static

Definition at line 5164 of file qdom.cpp.

References QByteArray::constData(), d, i, QByteArray::replace(), QByteArray::size(), and str.

Referenced by QDomEntityPrivate::save().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ encodeText()

static QString encodeText ( const QString str,
const bool  encodeQuotes = true,
const bool  performAVN = false,
const bool  encodeEOLs = false 
)
static

Definition at line 3610 of file qdom.cpp.

References QString::at(), i, QString::number(), QString::replace(), QString::size(), str, and QChar::unicode().

Referenced by QDomTextPrivate::save(), QDomAttrPrivate::save(), and QDomElementPrivate::save().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fixedCDataSection()

static QString fixedCDataSection ( const QString data,
bool *  ok 
)
static

Definition at line 207 of file qdom.cpp.

References QDomImplementation::AcceptInvalidChars, fixedCharData(), QString::indexOf(), QDomImplementationPrivate::invalidDataPolicy, ok, QString::remove(), and QDomImplementation::ReturnNullNode.

Referenced by QDomDocumentPrivate::createCDATASection().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fixedCharData()

static QString fixedCharData ( const QString data,
bool *  ok 
)
static

Definition at line 152 of file qdom.cpp.

References QDomImplementation::AcceptInvalidChars, QChar::fromUcs4(), QDomImplementationPrivate::invalidDataPolicy, QXmlUtils::isChar(), it, QChar::Null, ok, and QDomImplementation::ReturnNullNode.

Referenced by QDomDocumentPrivate::createTextNode(), fixedCDataSection(), fixedComment(), and fixedPIData().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fixedComment()

static QString fixedComment ( const QString data,
bool *  ok 
)
static

Definition at line 178 of file qdom.cpp.

References QDomImplementation::AcceptInvalidChars, fixedCharData(), QString::indexOf(), QDomImplementationPrivate::invalidDataPolicy, ok, QString::remove(), and QDomImplementation::ReturnNullNode.

Referenced by QDomDocumentPrivate::createComment().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fixedPIData()

static QString fixedPIData ( const QString data,
bool *  ok 
)
static

Definition at line 235 of file qdom.cpp.

References QDomImplementation::AcceptInvalidChars, fixedCharData(), QString::indexOf(), QDomImplementationPrivate::invalidDataPolicy, ok, QString::remove(), and QDomImplementation::ReturnNullNode.

Referenced by QDomDocumentPrivate::createProcessingInstruction().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fixedPubidLiteral()

static QString fixedPubidLiteral ( const QString data,
bool *  ok 
)
static

Definition at line 264 of file qdom.cpp.

References QDomImplementation::AcceptInvalidChars, QDomImplementationPrivate::invalidDataPolicy, QXmlUtils::isPublicID(), ok, and QDomImplementation::ReturnNullNode.

Referenced by QDomImplementation::createDocumentType().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fixedSystemLiteral()

static QString fixedSystemLiteral ( const QString data,
bool *  ok 
)
static

Definition at line 296 of file qdom.cpp.

References QDomImplementation::AcceptInvalidChars, QDomImplementationPrivate::invalidDataPolicy, ok, and QDomImplementation::ReturnNullNode.

Referenced by QDomImplementation::createDocumentType().

+ Here is the caller graph for this function:

◆ fixedXmlName()

static QString fixedXmlName ( const QString _name,
bool *  ok,
bool  namespaces = false 
)
static

Definition at line 98 of file qdom.cpp.

References QDomImplementation::AcceptInvalidChars, i, QDomImplementationPrivate::invalidDataPolicy, QString::isEmpty(), QXmlUtils::isLetter(), QXmlUtils::isNameChar(), ok, qt_split_namespace(), and QDomImplementation::ReturnNullNode.

Referenced by QDomDocumentPrivate::createAttribute(), QDomDocumentPrivate::createAttributeNS(), QDomImplementation::createDocumentType(), QDomDocumentPrivate::createElement(), QDomDocumentPrivate::createElementNS(), QDomDocumentPrivate::createEntityReference(), and QDomDocumentPrivate::createProcessingInstruction().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ qNormalizeNode()

static void qNormalizeNode ( QDomNodePrivate n)
static

Definition at line 1329 of file qdom.cpp.

References QDomNodePrivate::first, QDomNodePrivate::next, and QDomNodePrivate::removeChild().

Referenced by QDomNodePrivate::normalize().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ qt_split_namespace()

static void qt_split_namespace ( QString prefix,
QString name,
const QString qName,
bool  hasURI 
)
static

Definition at line 73 of file qdom.cpp.

References QString::clear(), i, QString::indexOf(), QString::left(), and QString::mid().

Referenced by QDomAttrPrivate::QDomAttrPrivate(), QDomElementPrivate::QDomElementPrivate(), fixedXmlName(), and QDomElementPrivate::setAttributeNS().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ quotedValue()

static QString quotedValue ( const QString data)
static

Definition at line 3046 of file qdom.cpp.

References QString::indexOf(), and quote().

Referenced by QDomDocumentTypePrivate::save(), QDomNotationPrivate::save(), and QDomEntityPrivate::save().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: