Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qdom.cpp File Reference

(b1e8287b8db5463f9a933302a27671b2b0ca1fa5)

#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 1381 of file qdom.cpp.

Referenced by QDomNode::appendChild(), QDomCharacterData::appendData(), QDomElement::attribute(), QDomElement::attributeNode(), QDomElement::attributeNodeNS(), QDomElement::attributeNS(), QDomElement::attributes(), QDomNode::cloneNode(), QDomNamedNodeMap::contains(), QDomDocument::createAttribute(), QDomDocument::createAttributeNS(), QDomDocument::createCDATASection(), QDomDocument::createComment(), QDomDocument::createDocumentFragment(), QDomDocument::createElement(), QDomDocument::createElementNS(), QDomDocument::createEntityReference(), QDomDocument::createProcessingInstruction(), QDomDocument::createTextNode(), QDomCharacterData::deleteData(), QDomDocument::doctype(), QDomDocument::documentElement(), QDomDocumentType::entities(), QDomNode::firstChild(), QDomElement::hasAttribute(), QDomElement::hasAttributeNS(), QDomNode::hasChildNodes(), QDomDocument::implementation(), QDomDocument::importNode(), QDomNode::insertAfter(), QDomNode::insertBefore(), QDomCharacterData::insertData(), QDomDocumentType::internalSubset(), QDomNamedNodeMap::item(), QDomNode::lastChild(), QDomNamedNodeMap::length(), QDomCharacterData::length(), QDomNode::localName(), QDomDocumentType::name(), QDomNamedNodeMap::namedItem(), QDomNamedNodeMap::namedItemNS(), QDomNode::namespaceURI(), QDomNode::nextSibling(), QDomNode::nodeName(), QDomNode::nodeType(), QDomNode::nodeValue(), QDomNode::normalize(), QDomEntity::notationName(), QDomDocumentType::notations(), QDomNode::ownerDocument(), QDomNode::parentNode(), QDomNode::prefix(), QDomNode::previousSibling(), QDomDocumentType::publicId(), QDomNotation::publicId(), QDomEntity::publicId(), QDomElement::removeAttribute(), QDomElement::removeAttributeNode(), QDomElement::removeAttributeNS(), QDomNode::removeChild(), QDomNamedNodeMap::removeNamedItem(), QDomNamedNodeMap::removeNamedItemNS(), QDomNode::replaceChild(), QDomCharacterData::replaceData(), QDomNode::save(), QDomElement::setAttribute(), QDomElement::setAttribute(), QDomElement::setAttribute(), QDomElement::setAttribute(), QDomElement::setAttribute(), QDomElement::setAttributeNode(), QDomElement::setAttributeNodeNS(), QDomElement::setAttributeNS(), QDomElement::setAttributeNS(), QDomElement::setAttributeNS(), QDomElement::setAttributeNS(), QDomDocument::setContent(), QDomNamedNodeMap::setNamedItem(), QDomNamedNodeMap::setNamedItemNS(), QDomNode::setNodeValue(), QDomNode::setPrefix(), QDomAttr::setValue(), QDomAttr::specified(), QDomText::splitText(), QDomCharacterData::substringData(), QDomDocumentType::systemId(), QDomNotation::systemId(), QDomEntity::systemId(), and QDomElement::text().

◆ IMPL [2/10]

#define IMPL   static_cast<QDomNamedNodeMapPrivate *>(impl)

Definition at line 1381 of file qdom.cpp.

◆ IMPL [3/10]

#define IMPL   static_cast<QDomDocumentTypePrivate *>(impl)

Definition at line 1381 of file qdom.cpp.

◆ IMPL [4/10]

#define IMPL   static_cast<QDomCharacterDataPrivate *>(impl)

Definition at line 1381 of file qdom.cpp.

◆ IMPL [5/10]

#define IMPL   static_cast<QDomAttrPrivate *>(impl)

Definition at line 1381 of file qdom.cpp.

◆ IMPL [6/10]

#define IMPL   static_cast<QDomElementPrivate *>(impl)

Definition at line 1381 of file qdom.cpp.

◆ IMPL [7/10]

#define IMPL   static_cast<QDomTextPrivate *>(impl)

Definition at line 1381 of file qdom.cpp.

◆ IMPL [8/10]

#define IMPL   static_cast<QDomNotationPrivate *>(impl)

Definition at line 1381 of file qdom.cpp.

◆ IMPL [9/10]

#define IMPL   static_cast<QDomEntityPrivate *>(impl)

Definition at line 1381 of file qdom.cpp.

◆ IMPL [10/10]

#define IMPL   static_cast<QDomDocumentPrivate *>(impl)

Definition at line 1381 of file qdom.cpp.

Function Documentation

◆ encodeEntity()

static QByteArray encodeEntity ( const QByteArray & str)
static

Definition at line 5167 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 3609 of file qdom.cpp.

References i, QString::number(), QString::size(), and str.

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(), QDomImplementationPrivate::invalidDataPolicy, ok, 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, QDomImplementationPrivate::invalidDataPolicy, QXmlUtils::isChar(), it, 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(), QDomImplementationPrivate::invalidDataPolicy, ok, 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(), QDomImplementationPrivate::invalidDataPolicy, ok, 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 1328 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::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 3045 of file qdom.cpp.

References 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: