4#include <qplatformdefs.h>
6#include "private/qxmlutils_p.h"
16#if QT_CONFIG(regularexpression)
24#include <private/qduplicatetracker_p.h>
25#include <private/qstringiterator_p.h>
83 prefix = qName.
left(
i);
106 if (
name.isEmpty()) {
117 bool firstChar =
true;
118 for (
int i = 0;
i <
name.size(); ++
i) {
144 if (namespaces && !prefix.
isEmpty())
145 return prefix + u
':' +
result;
161 while (
it.hasNext()) {
280 if (
result.indexOf(u
'\'') != -1 &&
result.indexOf(u
'"') != -1) {
305 if (
result.indexOf(u
'\'') != -1 &&
result.indexOf(u
'"') != -1) {
413 return (impl ==
x.impl);
422 return (impl !=
x.impl);
446 if (feature ==
"XML"_L1) {
447 if (version.
isEmpty() || version ==
"1.0"_L1)
502 dt->
name = fixedName;
535 return (impl ==
nullptr);
671 if (
p->isElement() &&
p->nodeName() ==
tagname) {
810 if (!impl || !
n.impl)
812 return (*impl == *
n.impl);
976 if (
p->nodeName() ==
n)
991 if (newChild == refChild)
995 if (refChild && refChild->
parent() !=
this)
1007 if (newChild->
first ==
nullptr)
1018 if (!refChild || refChild->
prev ==
nullptr) {
1037 newChild->
first =
nullptr;
1038 newChild->
last =
nullptr;
1053 first->prev = newChild;
1061 if (refChild->
prev ==
nullptr) {
1071 newChild->
next = refChild;
1074 refChild->
prev = newChild;
1086 if (newChild == refChild)
1090 if (refChild && refChild->
parent() !=
this)
1102 if (newChild->
first ==
nullptr)
1113 if (!refChild || refChild->
next ==
nullptr) {
1131 newChild->
first =
nullptr;
1132 newChild->
last =
nullptr;
1157 if (refChild->
next ==
nullptr) {
1167 newChild->
prev = refChild;
1170 refChild->
next = newChild;
1177 if (!newChild || !oldChild)
1179 if (oldChild->
parent() !=
this)
1181 if (newChild == oldChild)
1193 if (newChild->
first ==
nullptr)
1212 if (
first == oldChild)
1214 if (
last == oldChild)
1218 oldChild->
next =
nullptr;
1219 oldChild->
prev =
nullptr;
1225 newChild->
first =
nullptr;
1226 newChild->
last =
nullptr;
1252 if (
first == oldChild)
1254 if (
last == oldChild)
1258 oldChild->
next =
nullptr;
1259 oldChild->
prev =
nullptr;
1270 if (oldChild->
parent() !=
this)
1280 if (oldChild->
next ==
nullptr && oldChild->
prev ==
nullptr &&
first != oldChild)
1288 if (
last == oldChild)
1290 if (
first == oldChild)
1294 oldChild->
next =
nullptr;
1295 oldChild->
prev =
nullptr;
1312 while (
p && !
p->isDocument()) {
1338 t->appendData(
p->nodeValue());
1382#define IMPL static_cast<QDomNodePrivate *>(impl)
1539 return (
impl ==
n.impl);
1548 return (
impl !=
n.impl);
1594 if (!
IMPL->prefix.isEmpty())
1595 return IMPL->prefix + u
':' +
IMPL->name;
1633 IMPL->setNodeValue(
v);
1668 return IMPL->nodeType();
1840 return i.hasFeature(feature, version);
1859 return IMPL->namespaceURI;
1888 return IMPL->prefix;
1907 if (!
impl ||
IMPL->prefix.isNull())
1927 if (!
impl ||
IMPL->createdWithDom1Interface)
2068 qWarning(
"Calling appendChild() on a null node does nothing.");
2082 return IMPL->first !=
nullptr;
2091 return (
impl ==
nullptr);
2529 m->setNamedItem(new_node);
2543 if (!
it.value()->ref.deref())
2561 if (!
n->prefix.isNull()) {
2563 if (
n->namespaceURI == nsURI &&
n->name == localName)
2593 if (!
arg->prefix.isNull()) {
2651#define IMPL static_cast<QDomNamedNodeMapPrivate *>(impl)
2735 return (impl ==
n.impl);
2744 return (impl !=
n.impl);
2881 return IMPL->length();
2942 if (
p->isNotation())
2987 if (
p &&
p->isEntity())
2989 else if (
p &&
p->isNotation())
3000 if (
p &&
p->isEntity())
3002 else if (
p &&
p->isNotation())
3014 if (oldChild && oldChild->
isEntity())
3021 else if (
p->isNotation())
3033 if (
p &&
p->isEntity())
3035 else if (
p &&
p->isNotation())
3057 s <<
"<!DOCTYPE " <<
name;
3073 it2.value()->save(
s, 0, indent);
3077 it.value()->save(
s, 0, indent);
3091#define IMPL static_cast<QDomDocumentTypePrivate *>(impl)
3154 return IMPL->nodeName();
3187 return IMPL->publicId;
3200 return IMPL->systemId;
3213 return IMPL->internalSubset;
3241 name = u
"#document-fragment"_s;
3340 name = u
"#character-data"_s;
3358 return value.size();
3392#define IMPL static_cast<QDomCharacterDataPrivate *>(impl)
3480 return IMPL->dataLength();
3581 if (removed && !removed->ref.loadRelaxed())
3611 const bool encodeQuotes =
true,
3612 const bool performAVN =
false,
3613 const bool encodeEOLs =
false)
3626 }
else if (encodeQuotes && (ati == u
'"')) {
3630 }
else if (ati == u
'&') {
3634 }
else if (ati == u
'>' &&
i >= 2 && retval[
i - 1] == u
']' && retval[
i - 2] == u
']') {
3638 }
else if (performAVN &&
3639 (ati ==
QChar(0xA) ||
3640 ati ==
QChar(0xD) ||
3641 ati ==
QChar(0x9))) {
3644 i += replacement.
size();
3645 len += replacement.
size() - 1;
3646 }
else if (encodeEOLs && ati ==
QChar(0xD)) {
3688#define IMPL static_cast<QDomAttrPrivate *>(impl)
3778 return IMPL->specified();
3817 IMPL->m_specified =
true;
3880 return n->nodeValue();
3889 return n->nodeValue();
3897 n->setNodeValue(newValue);
3915 n->setNodeValue(newValue);
3930 if (
p &&
p->ref.loadRelaxed() == 0)
3989 if (
p->isText() ||
p->isCDATASection())
3991 else if (
p->isElement())
4018 nsDecl = u
" xmlns"_s;
4021 nsDecl = u
" xmlns:"_s +
prefix;
4025 s <<
'<' << qName << nsDecl;
4038 struct SavedAttribute {
4051 bool mayNeedXmlNS =
false;
4053 SavedAttribute attr;
4054 attr.name =
value->name;
4056 if (!
value->namespaceURI.isNull()) {
4057 attr.prefix =
value->prefix;
4058 mayNeedXmlNS =
true;
4061 attributesToSave.
push_back(std::move(attr));
4083 SavedAttribute nsAttr;
4085 nsAttr.name =
value->prefix;
4087 attributesToSave.
push_back(std::move(nsAttr));
4092 const auto savedAttributeComparator = [](
const SavedAttribute &lhs,
const SavedAttribute &rhs)
4095 return (cmp < 0) || ((cmp == 0) && (lhs.name < rhs.name));
4098 std::sort(attributesToSave.
begin(), attributesToSave.
end(), savedAttributeComparator);
4101 for (
const auto &attr : attributesToSave) {
4103 if (!attr.prefix.isEmpty())
4104 s << attr.prefix <<
':';
4105 s << attr.name <<
"=\"" << attr.encodedValue <<
'\"';
4111 if (
first->isText())
4123 s <<
"</" << qName <<
'>';
4140#define IMPL static_cast<QDomElementPrivate *>(impl)
4285 return IMPL->attribute(
name, defValue);
4368 x.setNum(
value,
'g', 17);
4490 IMPL->setAttributeNS(nsURI, qName,
value);
4514 IMPL->setAttributeNS(nsURI, qName,
x);
4526 IMPL->setAttributeNS(nsURI, qName,
x);
4537 x.setNum(
value,
'g', 17);
4538 IMPL->setAttributeNS(nsURI, qName,
x);
4554 IMPL->removeAttribute(
n->nodeName());
4633 return IMPL->text();
4666 qWarning(
"QDomText::splitText The node has no parent. So I cannot split");
4690#define IMPL static_cast<QDomTextPrivate *>(impl)
4780 name = u
"#comment"_s;
4804 if (
value.endsWith(u
'-'))
4890 name = u
"#cdata-section"_s;
4910 s <<
"<![CDATA[" <<
value <<
"]]>";
5018 s <<
"<!NOTATION " <<
name <<
' ';
5035#define IMPL static_cast<QDomNotationPrivate *>(impl)
5177 else if (
d[
i] ==
'"') {
5182 }
else if (
d[
i] ==
'&' &&
i + 1 <
len &&
d[
i+1] ==
'#') {
5201 _name = u
"% "_s + _name.
mid(1);
5206 s <<
"<!ENTITY " << _name <<
' ';
5225#define IMPL static_cast<QDomEntityPrivate *>(impl)
5331 return IMPL->m_notationName;
5363 s <<
'&' <<
name <<
';';
5614 name = u
"#document"_s;
5626 name = u
"#document"_s;
5634 if (dt !=
nullptr) {
5641 name = u
"#document"_s;
5646 impl(
n->impl->clone()),
5665 QDomDocument::ParseOptions options)
5673 const auto error = u
"Failed to set content, XML reader is not initialized"_s;
5680 if (!domParser.
parse())
5681 return domParser.
result();
5696 while (
p && !
p->isElement())
5824 switch (importedNode->
nodeType()) {
5876#if QT_CONFIG(regularexpression)
5879 if (
n &&
n->isProcessingInstruction() &&
n->nodeName() ==
"xml"_L1) {
5886 enc =
match.captured(5);
5890 qWarning() <<
"QDomDocument::save(): Unsupported encoding" << enc <<
"specified.";
5892 s.setEncoding(encoding.value());
5899 if (!doc && !(
n->isProcessingInstruction() &&
n->nodeName() ==
"xml"_L1)) {
5901 type->save(
s, 0, indent);
5904 n->save(
s, 0, indent);
5913 s <<
"<?xml version=\"1.0\" encoding=\""
5922 if (
n->isProcessingInstruction() &&
n->nodeName() ==
"xml"_L1) {
5923 startNode =
n->
next;
5932 startNode->
save(
s, 0, indent);
5933 startNode = startNode->
next;
5944#define IMPL static_cast<QDomDocumentPrivate *>(impl)
6085#if QT_DEPRECATED_SINCE(6, 8)
6098 QString *errorMsg,
int *errorLine,
int *errorColumn)
6100 QXmlStreamReader reader(
text);
6101 reader.setNamespaceProcessing(namespaceProcessing);
6102 return setContent(&reader, namespaceProcessing, errorMsg, errorLine, errorColumn);
6158 QString *errorMsg,
int *errorLine,
int *errorColumn)
6161 reader.setNamespaceProcessing(namespaceProcessing);
6162 return setContent(&reader, namespaceProcessing, errorMsg, errorLine, errorColumn);
6165static inline QDomDocument::ParseOptions toParseOptions(
bool namespaceProcessing)
6172 QString *errorMsg,
int *errorLine,
int *errorColumn)
6178 *errorLine =
static_cast<int>(parseResult.
errorLine);
6180 *errorColumn =
static_cast<int>(parseResult.
errorLine);
6197 QString *errorMsg,
int *errorLine,
int *errorColumn)
6200 unpackParseResult(
result, errorMsg, errorLine, errorColumn);
6217 return setContent(
text,
false, errorMsg, errorLine, errorColumn);
6246 return setContent(dev,
false, errorMsg, errorLine, errorColumn);
6270 QString *errorMsg,
int *errorLine,
int *errorColumn)
6272 ParseResult
result =
setContent(reader, toParseOptions(namespaceProcessing));
6273 unpackParseResult(
result, errorMsg, errorLine, errorColumn);
6399 QXmlStreamReader reader(
data);
6406#if QT_VERSION < QT_VERSION_CHECK(7, 0, 0)
6408 qWarning(
"QDomDocument called with unopened QIODevice. "
6409 "This will not be supported in future Qt versions.");
6411 const auto error = u
"QDomDocument::setContent: Failed to open device."_s;
6418 QXmlStreamReader reader(
device);
6427 return IMPL->setContent(reader, options);
6709 if (importedNode.
isNull())
6751 return QDomAttr(
IMPL->createAttributeNS(nsURI, qName));
6779 qWarning(
"elementById() is not implemented and will always return a null node.");
IOBluetoothDevice * device
qsizetype size() const noexcept
Returns the number of bytes in this byte array.
const char * constData() const noexcept
Returns a pointer to the const data stored in the byte array.
QByteArray & replace(qsizetype index, qsizetype len, const char *s, qsizetype alen)
This is an overloaded member function, provided for convenience. It differs from the above function o...
static constexpr auto fromUcs4(char32_t c) noexcept
constexpr char16_t unicode() const noexcept
Returns the numeric Unicode value of the QChar.
QDomAttrPrivate(QDomDocumentPrivate *, QDomNodePrivate *, const QString &name)
QDomNodePrivate * cloneNode(bool deep=true) override
virtual void save(QTextStream &s, int, int) const override
void setNodeValue(const QString &v) override
QDomAttr()
Constructs an empty attribute.
QDomAttr & operator=(const QDomAttr &)
Assigns x to this DOM attribute.
QString name() const
Returns the attribute's name.
QString value() const
Returns the value of the attribute or an empty string if the attribute has not been specified.
bool specified() const
Returns true if the attribute has been set by the user with setValue().
void setValue(const QString &)
Sets the attribute's value to v.
QDomElement ownerElement() const
Returns the element node this attribute is attached to or a \l{QDomNode::isNull()}{null node} if this...
QDomCDATASectionPrivate(QDomDocumentPrivate *, QDomNodePrivate *parent, const QString &val)
virtual void save(QTextStream &s, int, int) const override
QDomNodePrivate * cloneNode(bool deep=true) override
QDomCDATASection()
Constructs an empty CDATA section.
QDomCDATASection & operator=(const QDomCDATASection &)
Assigns x to this CDATA section.
QDomNodePrivate * cloneNode(bool deep=true) override
QDomCharacterDataPrivate(QDomDocumentPrivate *, QDomNodePrivate *parent, const QString &data)
void appendData(const QString &arg)
void insertData(unsigned long offset, const QString &arg)
QString substringData(unsigned long offset, unsigned long count) const
void deleteData(unsigned long offset, unsigned long count)
void replaceData(unsigned long offset, unsigned long count, const QString &arg)
int length() const
Returns the length of the stored string.
QString data() const
Returns the string stored in this object.
QDomCharacterData()
Constructs an empty character data object.
void replaceData(unsigned long offset, unsigned long count, const QString &arg)
Replaces the substring of length count starting at position offset with the string arg.
void deleteData(unsigned long offset, unsigned long count)
Deletes a substring of length count from position offset.
QString substringData(unsigned long offset, unsigned long count)
Returns the substring of length count from position offset.
void appendData(const QString &arg)
Appends the string arg to the stored string.
void setData(const QString &)
Sets this object's string to v.
void insertData(unsigned long offset, const QString &arg)
Inserts the string arg into the stored string at position offset.
QDomNode::NodeType nodeType() const
Returns the type of node this object refers to (i.e.
QDomCharacterData & operator=(const QDomCharacterData &)
Assigns x to this character data.
QDomDocumentFragmentPrivate(QDomDocumentPrivate *, QDomNodePrivate *parent=nullptr)
virtual QDomNodePrivate * cloneNode(bool deep=true) override
QDomDocumentFragment & operator=(const QDomDocumentFragment &)
Assigns x to this DOM document fragment.
QDomDocumentFragment()
Constructs an empty document fragment.
QDomDocument::ParseResult setContent(QXmlStreamReader *reader, QDomDocument::ParseOptions options)
QDomNodePrivate * cloneNode(bool deep=true) override
QDomElementPrivate * createElement(const QString &tagName)
QDomAttrPrivate * createAttribute(const QString &name)
QDomCDATASectionPrivate * createCDATASection(const QString &data)
QDomProcessingInstructionPrivate * createProcessingInstruction(const QString &target, const QString &data)
QDomTextPrivate * createTextNode(const QString &data)
QDomDocumentFragmentPrivate * createDocumentFragment()
void saveDocument(QTextStream &stream, const int indent, QDomNode::EncodingPolicy encUsed) const
QDomAttrPrivate * createAttributeNS(const QString &nsURI, const QString &qName)
QDomNodePrivate * importNode(QDomNodePrivate *importedNode, bool deep)
QDomElementPrivate * documentElement()
QExplicitlySharedDataPointer< QDomImplementationPrivate > impl
QDomEntityReferencePrivate * createEntityReference(const QString &name)
QDomElementPrivate * createElementNS(const QString &nsURI, const QString &qName)
QDomCommentPrivate * createComment(const QString &data)
QDomNodePrivate * insertAfter(QDomNodePrivate *newChild, QDomNodePrivate *refChild) override
QDomDocumentTypePrivate(QDomDocumentPrivate *, QDomNodePrivate *parent=nullptr)
void save(QTextStream &s, int, int) const override
~QDomDocumentTypePrivate()
QDomNodePrivate * removeChild(QDomNodePrivate *oldChild) override
QDomNodePrivate * cloneNode(bool deep=true) override
QDomNodePrivate * appendChild(QDomNodePrivate *newChild) override
QDomNodePrivate * replaceChild(QDomNodePrivate *newChild, QDomNodePrivate *oldChild) override
QDomNodePrivate * insertBefore(QDomNodePrivate *newChild, QDomNodePrivate *refChild) override
QDomNamedNodeMapPrivate * entities
QDomNamedNodeMapPrivate * notations
QString publicId() const
Returns the public identifier of the external DTD subset or an empty string if there is no public ide...
QDomDocumentType()
Creates an empty QDomDocumentType object.
QDomNamedNodeMap notations() const
Returns a map of all notations described in the DTD.
QDomDocumentType & operator=(const QDomDocumentType &)
Assigns n to this document type.
QString name() const
Returns the name of the document type as specified in the <!DOCTYPE name> tag.
QString internalSubset() const
Returns the internal subset of the document type or an empty string if there is no internal subset.
QString systemId() const
Returns the system identifier of the external DTD subset or an empty string if there is no system ide...
QDomNamedNodeMap entities() const
Returns a map of all entities described in the DTD.
QDomText createTextNode(const QString &data)
Creates a text node for the string value that can be inserted into the document tree,...
QDomProcessingInstruction createProcessingInstruction(const QString &target, const QString &data)
Creates a new processing instruction that can be inserted into the document, e.g.
Q_WEAK_OVERLOAD ParseResult setContent(const QByteArray &data, ParseOptions options=ParseOption::Default)
QByteArray toByteArray(int=1) const
Converts the parsed document back to its textual representation and returns a QByteArray containing t...
QDomAttr createAttribute(const QString &name)
Creates a new attribute called name that can be inserted into an element, e.g.
QDomDocument & operator=(const QDomDocument &)
Assigns x to this DOM document.
QDomNode importNode(const QDomNode &importedNode, bool deep)
Imports the node importedNode from another document to this document.
QDomElement documentElement() const
Returns the root element of the document.
QDomCDATASection createCDATASection(const QString &data)
Creates a new CDATA section for the string value that can be inserted into the document,...
QDomElement createElement(const QString &tagName)
Creates a new element called tagName that can be inserted into the DOM tree, e.g.
QDomDocument()
Constructs an empty document.
~QDomDocument()
Destroys the object and frees its resources.
QString toString(int=1) const
Converts the parsed document back to its textual representation.
QDomImplementation implementation() const
Returns a QDomImplementation object.
QDomNodeList elementsByTagName(const QString &tagname) const
Returns a QDomNodeList, that contains all the elements in the document with the name tagname.
QDomNodeList elementsByTagNameNS(const QString &nsURI, const QString &localName)
Returns a QDomNodeList that contains all the elements in the document with the local name localName a...
QDomDocumentFragment createDocumentFragment()
Creates a new document fragment, that can be used to hold parts of the document, e....
QDomAttr createAttributeNS(const QString &nsURI, const QString &qName)
Creates a new attribute with namespace support that can be inserted into an element.
QDomEntityReference createEntityReference(const QString &name)
Creates a new entity reference called name that can be inserted into the document,...
QDomElement elementById(const QString &elementId)
Returns the element whose ID is equal to elementId.
QDomComment createComment(const QString &data)
Creates a new comment for the string value that can be inserted into the document,...
QDomDocumentType doctype() const
Returns the document type of this document.
QDomElement createElementNS(const QString &nsURI, const QString &qName)
Creates a new element with namespace support that can be inserted into the DOM tree.
bool hasAttribute(const QString &name)
QDomElementPrivate(QDomDocumentPrivate *, QDomNodePrivate *parent, const QString &name)
QString attributeNS(const QString &nsURI, const QString &localName, const QString &defValue) const
QDomNamedNodeMapPrivate * m_attr
QString attribute(const QString &name, const QString &defValue) const
virtual void save(QTextStream &s, int, int) const override
void setAttribute(const QString &name, const QString &value)
void removeAttribute(const QString &name)
QDomAttrPrivate * removeAttributeNode(QDomAttrPrivate *oldAttr)
QDomNodePrivate * cloneNode(bool deep=true) override
bool hasAttributeNS(const QString &nsURI, const QString &localName)
QDomAttrPrivate * attributeNode(const QString &name)
QDomAttrPrivate * setAttributeNodeNS(QDomAttrPrivate *newAttr)
QDomAttrPrivate * setAttributeNode(QDomAttrPrivate *newAttr)
void setAttributeNS(const QString &nsURI, const QString &qName, const QString &newValue)
QDomAttrPrivate * attributeNodeNS(const QString &nsURI, const QString &localName)
void removeAttributeNS(const QString &nsURI, const QString &localName)
Removes the attribute with the local name localName and the namespace URI nsURI from this element.
QDomAttr setAttributeNodeNS(const QDomAttr &newAttr)
Adds the attribute newAttr to this element.
bool hasAttributeNS(const QString &nsURI, const QString &localName) const
Returns true if this element has an attribute with the local name localName and the namespace URI nsU...
void removeAttribute(const QString &name)
Removes the attribute called name name from this element.
bool hasAttribute(const QString &name) const
Returns true if this element has an attribute called name; otherwise returns false.
QDomAttr attributeNode(const QString &name)
Returns the QDomAttr object that corresponds to the attribute called name.
QDomAttr attributeNodeNS(const QString &nsURI, const QString &localName)
Returns the QDomAttr object that corresponds to the attribute with the local name localName and the n...
void setAttribute(const QString &name, const QString &value)
Adds an attribute called name with value value.
QString tagName() const
Returns the tag name of this element.
QDomAttr setAttributeNode(const QDomAttr &newAttr)
Adds the attribute newAttr to this element.
void setAttributeNS(const QString &nsURI, const QString &qName, const QString &value)
Adds an attribute with the qualified name qName and the namespace URI nsURI with the value value.
QDomNamedNodeMap attributes() const
Returns a QDomNamedNodeMap containing all this element's attributes.
QString text() const
Returns the element's text or an empty string.
QDomNodeList elementsByTagNameNS(const QString &nsURI, const QString &localName) const
Returns a QDomNodeList containing all descendants of this element with local name localName and names...
QDomAttr removeAttributeNode(const QDomAttr &oldAttr)
Removes the attribute oldAttr from the element and returns it.
void setTagName(const QString &name)
Sets this element's tag name to name.
QDomElement()
Constructs an empty element.
QString attributeNS(const QString &nsURI, const QString &localName, const QString &defValue=QString()) const
Returns the attribute with the local name localName and the namespace URI nsURI.
QDomElement & operator=(const QDomElement &)
Assigns x to this DOM element.
QDomNodeList elementsByTagName(const QString &tagname) const
Returns a QDomNodeList containing all descendants of this element named tagname encountered during a ...
QString attribute(const QString &name, const QString &defValue=QString()) const
Returns the attribute called name.
virtual void save(QTextStream &s, int, int) const override
QDomEntityPrivate(QDomDocumentPrivate *, QDomNodePrivate *parent, const QString &name, const QString &pub, const QString &sys, const QString ¬ation)
QDomNodePrivate * cloneNode(bool deep=true) override
QDomNodePrivate * cloneNode(bool deep=true) override
QDomEntityReferencePrivate(QDomDocumentPrivate *, QDomNodePrivate *parent, const QString &name)
virtual void save(QTextStream &s, int, int) const override
QDomEntityReference & operator=(const QDomEntityReference &)
Assigns x to this entity reference.
QDomEntityReference()
Constructs an empty entity reference.
QDomEntity & operator=(const QDomEntity &)
Assigns x to this DOM entity.
QString publicId() const
Returns the public identifier associated with this entity.
QString systemId() const
Returns the system identifier associated with this entity.
QString notationName() const
For unparsed entities this function returns the name of the notation for the entity.
QDomEntity()
Constructs an empty entity.
QDomImplementationPrivate()
static QDomImplementation::InvalidDataPolicy invalidDataPolicy
QDomImplementationPrivate * clone()
bool operator!=(const QDomImplementation &) const
Returns true if x and this DOM implementation object were created from different QDomDocuments; other...
bool operator==(const QDomImplementation &) const
Returns true if x and this DOM implementation object were created from the same QDomDocument; otherwi...
QDomDocument createDocument(const QString &nsURI, const QString &qName, const QDomDocumentType &doctype)
Creates a DOM document with the document type doctype.
QDomImplementation()
Constructs a QDomImplementation object.
QDomDocumentType createDocumentType(const QString &qName, const QString &publicId, const QString &systemId)
Creates a document type node for the name qName.
friend class QDomDocument
InvalidDataPolicy
This enum specifies what should be done when a factory function in QDomDocument is called with invali...
bool isNull()
Returns false if the object was created by QDomDocument::implementation(); otherwise returns true.
bool hasFeature(const QString &feature, const QString &version) const
The function returns true if QDom implements the requested version of a feature; otherwise returns fa...
static void setInvalidDataPolicy(InvalidDataPolicy policy)
static InvalidDataPolicy invalidDataPolicy()
~QDomImplementation()
Destroys the object and frees its resources.
QDomImplementation & operator=(const QDomImplementation &)
Assigns x to this DOM implementation.
bool contains(const QString &name) const
void setAppendToParent(bool b)
QDomNamedNodeMapPrivate * clone(QDomNodePrivate *parent)
QDomNodePrivate * namedItemNS(const QString &nsURI, const QString &localName) const
QDomNodePrivate * item(int index) const
QDomNamedNodeMapPrivate(QDomNodePrivate *)
QDomNodePrivate * setNamedItem(QDomNodePrivate *arg)
QMultiHash< QString, QDomNodePrivate * > map
bool containsNS(const QString &nsURI, const QString &localName) const
QDomNodePrivate * namedItem(const QString &name) const
QDomNodePrivate * removeNamedItem(const QString &name)
~QDomNamedNodeMapPrivate()
QDomNodePrivate * setNamedItemNS(QDomNodePrivate *arg)
~QDomNamedNodeMap()
Destroys the object and frees its resources.
QDomNode namedItemNS(const QString &nsURI, const QString &localName) const
Returns the node associated with the local name localName and the namespace URI nsURI.
QDomNode removeNamedItem(const QString &name)
Removes the node called name from the map.
QDomNamedNodeMap()
Constructs an empty named node map.
QDomNode removeNamedItemNS(const QString &nsURI, const QString &localName)
Removes the node with the local name localName and the namespace URI nsURI from the map.
bool operator==(const QDomNamedNodeMap &) const
Returns true if n and this named node map are equal; otherwise returns false.
QDomNode namedItem(const QString &name) const
Returns the node called name.
QDomNode setNamedItem(const QDomNode &newNode)
Inserts the node newNode into the named node map.
int length() const
Returns the number of nodes in the map.
bool contains(const QString &name) const
Returns true if the map contains a node called name; otherwise returns false.
QDomNode setNamedItemNS(const QDomNode &newNode)
Inserts the node newNode in the map.
QDomNode item(int index) const
Retrieves the node at position index.
QDomNamedNodeMap & operator=(const QDomNamedNodeMap &)
Assigns n to this named node map.
bool operator!=(const QDomNamedNodeMap &) const
Returns true if n and this named node map are not equal; otherwise returns false.
QList< QDomNodePrivate * > list
bool operator==(const QDomNodeListPrivate &) const
QDomNodePrivate * node_impl
QDomNodePrivate * item(int index)
QDomNodeListPrivate(QDomNodePrivate *)
bool operator!=(const QDomNodeListPrivate &) const
bool operator==(const QDomNodeList &) const
Returns true if the node list n and this node list are equal; otherwise returns false.
QDomNode item(int index) const
Returns the node at position index.
int length() const
Returns the number of nodes in the list.
~QDomNodeList()
Destroys the object and frees its resources.
QDomNodeList & operator=(const QDomNodeList &)
Assigns n to this node list.
bool operator!=(const QDomNodeList &) const
Returns true the node list n and this node list are not equal; otherwise returns false.
QDomNodeList()
Creates an empty node list.
QDomDocumentPrivate * ownerDocument()
void setOwnerDocument(QDomDocumentPrivate *doc)
bool isDocumentFragment() const
virtual void setNodeValue(const QString &v)
QString nodeValue() const
virtual QDomNodePrivate * insertAfter(QDomNodePrivate *newChild, QDomNodePrivate *refChild)
virtual ~QDomNodePrivate()
QDomNodePrivate(QDomDocumentPrivate *, QDomNodePrivate *parent=nullptr)
QDomNodePrivate * ownerNode
bool isCDATASection() const
bool isEntityReference() const
virtual QDomNodePrivate * appendChild(QDomNodePrivate *newChild)
virtual void save(QTextStream &, int, int) const
QDomNodePrivate * namedItem(const QString &name)
void setParent(QDomNodePrivate *p)
virtual QDomNodePrivate * removeChild(QDomNodePrivate *oldChild)
void setLocation(int lineNumber, int columnNumber)
bool createdWithDom1Interface
QDomNodePrivate * parent() const
bool isDocumentType() const
virtual QDomNodePrivate * replaceChild(QDomNodePrivate *newChild, QDomNodePrivate *oldChild)
virtual QDomNodePrivate * cloneNode(bool deep=true)
virtual QDomNode::NodeType nodeType() const
bool isCharacterData() const
bool isProcessingInstruction() const
virtual QDomNodePrivate * insertBefore(QDomNodePrivate *newChild, QDomNodePrivate *refChild)
QString nodeName() const
Returns the name of the node.
bool isCharacterData() const
Returns true if the node is a character data node; otherwise returns false.
void save(QTextStream &, int, EncodingPolicy=QDomNode::EncodingFromDocument) const
Writes the XML representation of the node and all its children to the stream stream.
QDomDocument toDocument() const
Converts a QDomNode into a QDomDocument.
QDomEntityReference toEntityReference() const
Converts a QDomNode into a QDomEntityReference.
QDomNode()
Constructs a \l{isNull()}{null} node.
friend class QDomDocumentType
QDomNode replaceChild(const QDomNode &newChild, const QDomNode &oldChild)
Replaces oldChild with newChild.
QDomNode parentNode() const
Returns the parent node.
QDomNodeList childNodes() const
Returns a list of all direct child nodes.
QDomDocumentType toDocumentType() const
Converts a QDomNode into a QDomDocumentType.
friend class QDomNodeList
friend class QDomDocument
QString prefix() const
Returns the namespace prefix of the node or an empty string if the node has no namespace prefix.
QDomElement lastChildElement(const QString &tagName=QString(), const QString &namespaceURI=QString()) const
Returns the last child element with tag name tagName and namespace URI namespaceURI.
bool hasChildNodes() const
Returns true if the node has one or more children; otherwise returns false.
QDomEntity toEntity() const
Converts a QDomNode into a QDomEntity.
QDomNode insertAfter(const QDomNode &newChild, const QDomNode &refChild)
Inserts the node newChild after the child node refChild.
QDomElement nextSiblingElement(const QString &taName=QString(), const QString &namespaceURI=QString()) const
Returns the next sibling element with tag name tagName and namespace URI namespaceURI.
QDomDocumentFragment toDocumentFragment() const
Converts a QDomNode into a QDomDocumentFragment.
QDomAttr toAttr() const
Converts a QDomNode into a QDomAttr.
friend class QDomNamedNodeMap
QDomNode lastChild() const
Returns the last child of the node.
bool isAttr() const
Returns true if the node is an attribute; otherwise returns false.
bool isProcessingInstruction() const
Returns true if the node is a processing instruction; otherwise returns false.
QDomCDATASection toCDATASection() const
Converts a QDomNode into a QDomCDATASection.
QDomCharacterData toCharacterData() const
Converts a QDomNode into a QDomCharacterData.
void clear()
Converts the node into a null node; if it was not a null node before, its type and contents are delet...
QDomNode firstChild() const
Returns the first child of the node.
QDomNotation toNotation() const
Converts a QDomNode into a QDomNotation.
QDomElement toElement() const
Converts a QDomNode into a QDomElement.
bool isEntity() const
Returns true if the node is an entity; otherwise returns false.
void setNodeValue(const QString &)
Sets the node's value to v.
QDomNode nextSibling() const
Returns the next sibling in the document tree.
QString namespaceURI() const
Returns the namespace URI of this node or an empty string if the node has no namespace URI.
QDomDocument ownerDocument() const
Returns the document to which this node belongs.
bool isEntityReference() const
Returns true if the node is an entity reference; otherwise returns false.
bool operator!=(const QDomNode &) const
Returns true if n and this DOM node are not equal; otherwise returns false.
QDomNode namedItem(const QString &name) const
Returns the first direct child node for which nodeName() equals name.
QDomNode cloneNode(bool deep=true) const
Creates a deep (not shallow) copy of the QDomNode.
bool isText() const
Returns true if the node is a text node; otherwise returns false.
bool isNotation() const
Returns true if the node is a notation; otherwise returns false.
void setPrefix(const QString &pre)
If the node has a namespace prefix, this function changes the namespace prefix of the node to pre.
bool isNull() const
Returns true if this node is null (i.e.
QDomProcessingInstruction toProcessingInstruction() const
Converts a QDomNode into a QDomProcessingInstruction.
void normalize()
Calling normalize() on an element converts all its children into a standard form.
QString localName() const
If the node uses namespaces, this function returns the local name of the node; otherwise it returns a...
QTextStream & operator<<(QTextStream &str, const QDomNode &node)
Writes the XML representation of the node node and all its children to the stream str.
QDomText toText() const
Converts a QDomNode into a QDomText.
bool isComment() const
Returns true if the node is a comment; otherwise returns false.
bool isDocumentFragment() const
Returns true if the node is a document fragment; otherwise returns false.
QDomNamedNodeMap attributes() const
Returns a named node map of all attributes.
bool hasAttributes() const
Returns true if the node has attributes; otherwise returns false.
QDomElement previousSiblingElement(const QString &tagName=QString(), const QString &namespaceURI=QString()) const
Returns the previous sibling element with tag name tagName and namespace URI namespaceURI.
bool isElement() const
Returns true if the node is an element; otherwise returns false.
QDomNode & operator=(const QDomNode &)
Assigns a copy of n to this DOM node.
bool isCDATASection() const
Returns true if the node is a CDATA section; otherwise returns false.
NodeType
This enum defines the type of the node: \value ElementNode \value AttributeNode \value TextNode \valu...
@ ProcessingInstructionNode
bool isSupported(const QString &feature, const QString &version) const
Returns true if the DOM implementation implements the feature feature and this feature is supported b...
QDomNode insertBefore(const QDomNode &newChild, const QDomNode &refChild)
Inserts the node newChild before the child node refChild.
bool operator==(const QDomNode &) const
Returns true if n and this DOM node are equal; otherwise returns false.
QString nodeValue() const
Returns the value of the node.
QDomNode removeChild(const QDomNode &oldChild)
Removes oldChild from the list of children.
bool isDocument() const
Returns true if the node is a document; otherwise returns false.
QDomElement firstChildElement(const QString &tagName=QString(), const QString &namespaceURI=QString()) const
Returns the first child element with tag name tagName and namespace URI namespaceURI.
QDomComment toComment() const
Converts a QDomNode into a QDomComment.
QDomNode previousSibling() const
Returns the previous sibling in the document tree.
QDomNode appendChild(const QDomNode &newChild)
Appends newChild as the node's last child.
bool isDocumentType() const
Returns true if the node is a document type; otherwise returns false.
NodeType nodeType() const
Returns the type of the node.
~QDomNode()
Destroys the object and frees its resources.
virtual void save(QTextStream &s, int, int) const override
QDomNotationPrivate(QDomDocumentPrivate *, QDomNodePrivate *parent, const QString &name, const QString &pub, const QString &sys)
QDomNodePrivate * cloneNode(bool deep=true) override
QDomNotation()
Constructor.
QDomNotation & operator=(const QDomNotation &)
Assigns x to this DOM notation.
QString publicId() const
Returns the public identifier of this notation.
QString systemId() const
Returns the system identifier of this notation.
QDomDocument::ParseResult result() const
QDomNodePrivate * cloneNode(bool deep=true) override
virtual void save(QTextStream &s, int, int) const override
QDomProcessingInstructionPrivate(QDomDocumentPrivate *, QDomNodePrivate *parent, const QString &target, const QString &data)
QDomProcessingInstruction()
Constructs an empty processing instruction.
QDomProcessingInstruction & operator=(const QDomProcessingInstruction &)
Assigns x to this processing instruction.
QString target() const
Returns the target of this processing instruction.
void setData(const QString &d)
Sets the data contained in the processing instruction to d.
QString data() const
Returns the content of this processing instruction.
QDomNodePrivate * cloneNode(bool deep=true) override
QDomTextPrivate(QDomDocumentPrivate *, QDomNodePrivate *parent, const QString &val)
QDomTextPrivate * splitText(int offset)
virtual void save(QTextStream &s, int, int) const override
QDomText()
Constructs an empty QDomText object.
QDomText splitText(int offset)
Splits this DOM text object into two QDomText objects.
QDomText & operator=(const QDomText &)
Assigns x to this DOM text.
void reset(T *ptr=nullptr) noexcept
\inmodule QtCore \reentrant
qsizetype size() const noexcept
const_reference at(qsizetype i) const noexcept
void append(parameter_type t)
iterator find(const Key &key)
const_iterator constBegin() const noexcept
Returns a const \l{STL-style iterators}{STL-style iterator} pointing to the first item in the hash.
const_iterator constEnd() const noexcept
Returns a const \l{STL-style iterators}{STL-style iterator} pointing to the imaginary item after the ...
T value(const Key &key) const noexcept
bool contains(const Key &key) const noexcept
qsizetype remove(const Key &key)
iterator insert(const Key &key, const T &value)
Inserts a new item with the key and a value of value.
bool isEmpty() const noexcept
iterator begin()
Returns an \l{STL-style iterators}{STL-style iterator} pointing to the first item in the hash.
qsizetype size() const noexcept
void clear() noexcept(std::is_nothrow_destructible< Node >::value)
iterator end() noexcept
Returns an \l{STL-style iterators}{STL-style iterator} pointing to the imaginary item after the last ...
\inmodule QtCore \reentrant
QRegularExpressionMatch match(const QString &subject, qsizetype offset=0, MatchType matchType=NormalMatch, MatchOptions matchOptions=NoMatchOption) const
Attempts to match the regular expression against the given subject string, starting at the position o...
static Q_CORE_EXPORT const char * nameForEncoding(Encoding e)
Returns the canonical name for encoding e.
static Q_CORE_EXPORT std::optional< Encoding > encodingForName(const char *name) noexcept
Convert name to the corresponding \l Encoding member, if there is one.
\macro QT_RESTRICTED_CAST_FROM_ASCII
bool startsWith(const QString &s, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
Returns true if the string starts with s; otherwise returns false.
QString & replace(qsizetype i, qsizetype len, QChar after)
static QString fromLatin1(QByteArrayView ba)
This is an overloaded member function, provided for convenience. It differs from the above function o...
void clear()
Clears the contents of the string and makes it null.
bool isNull() const
Returns true if this string is null; otherwise returns false.
qsizetype size() const
Returns the number of characters in this string.
QString mid(qsizetype position, qsizetype n=-1) const
Returns a string that contains n characters of this string, starting at the specified position index.
const QChar at(qsizetype i) const
Returns the character at the given index position in the string.
bool isEmpty() const
Returns true if the string has no characters; otherwise returns false.
int compare(const QString &s, Qt::CaseSensitivity cs=Qt::CaseSensitive) const noexcept
static QString number(int, int base=10)
This is an overloaded member function, provided for convenience. It differs from the above function o...
QString left(qsizetype n) const
Returns a substring that contains the n leftmost characters of the string.
static QString static QString qsizetype indexOf(QChar c, qsizetype from=0, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
QString & remove(qsizetype i, qsizetype len)
Removes n characters from the string, starting at the given position index, and returns a reference t...
QByteArray toUtf8() const &
void push_back(const T &t)
void reserve(qsizetype sz)
iterator begin() noexcept
static bool isChar(const char32_t c)
static bool isPublicID(QStringView candidate)
static bool isLetter(const QChar c)
static bool isNameChar(const QChar c)
QSet< QString >::iterator it
Combined button and popup list for selecting options.
QTextStream & endl(QTextStream &stream)
Writes '\n' to the stream and flushes the stream.
QImageReader reader("image.png")
[1]
#define QT_WARNING_DISABLE_DEPRECATED
DBusConnection const char DBusError * error
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 QString fixedXmlName(const QString &_name, bool *ok, bool namespaces=false)
static QString fixedCharData(const QString &data, bool *ok)
static QString quotedValue(const QString &data)
static void qt_split_namespace(QString &prefix, QString &name, const QString &qName, bool hasURI)
static QString encodeText(const QString &str, const bool encodeQuotes=true, const bool performAVN=false, const bool encodeEOLs=false)
static QString fixedCDataSection(const QString &data, bool *ok)
static QString fixedComment(const QString &data, bool *ok)
static QByteArray encodeEntity(const QByteArray &str)
static void qNormalizeNode(QDomNodePrivate *n)
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
GLsizei const GLfloat * v
[13]
GLint GLint GLint GLint GLint x
[0]
GLint GLenum GLsizei GLsizei GLsizei depth
GLboolean GLboolean GLboolean GLboolean a
[7]
GLenum GLenum GLsizei count
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
GLenum GLuint GLintptr offset
#define qPrintable(string)
#define QStringLiteral(str)
static bool match(const uchar *found, uint foundLen, const char *target, uint targetLen)
static QString quote(const QString &str)
The struct is used to store the result of QDomDocument::setContent().
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent