Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
src_xml_dom_qdom_snippet.cpp
Go to the documentation of this file.
1// Copyright (C) 2020 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
4<body>
5<h1>Heading</h1>
6<p>Hello <b>you</b></p>
7</body>
9
11<h1>Heading</h1>
12<p>The text...</p>
13<h2>Next heading</h2>
15
17<h1>Heading</h1>
18<p>The text...</p>
19<h2>Next heading</h2>
21
23<link href="http://qt-project.org" color="red" />
25
27QDomElement e = //...
28//...
29QString s = e.text()
31
33QDomDocument doc = // ...
34QDomElement root = doc.firstChildElement("database");
35QDomElement elt = root.firstChildElement("entry");
36for (; !elt.isNull(); elt = elt.nextSiblingElement("entry")) {
37 // ...
38}
40
42<img src="myimg.png">
44
46<h1>Hello <b>Qt</b> <![CDATA[<xml is cool>]]></h1>
48
50Hello Qt <xml is cool>
52
54<!-- this is a comment -->
\reentrant
Definition qdom.h:266
\reentrant
Definition qdom.h:468
QDomElement nextSiblingElement(const QString &taName=QString(), const QString &namespaceURI=QString()) const
Returns the next sibling element with tag name tagName and namespace URI namespaceURI.
Definition qdom.cpp:2437
bool isNull() const
Returns true if this node is null (i.e.
Definition qdom.cpp:2089
QDomElement firstChildElement(const QString &tagName=QString(), const QString &namespaceURI=QString()) const
Returns the first child element with tag name tagName and namespace URI namespaceURI.
Definition qdom.cpp:2392
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:127
QString text
double e
GLboolean GLboolean GLboolean b
GLboolean GLboolean GLboolean GLboolean a
[7]
GLenum src
GLint void * img
Definition qopenglext.h:233
GLdouble s
[6]
Definition qopenglext.h:235
GLfloat GLfloat p
[1]
QXmlStreamReader xml
[0]