7#include <QDomImplementation>
48 cout <<
"Element name: " <<
qPrintable(
e.tagName()) <<
'\n';
62QDomElement element3 = document.createElement(
"MyElement");
63QDomElement element4 = document.createElement(
"MyElement");
71a.setValue(
"http://qt-project.org/doc");
QDomText createTextNode(const QString &data)
Creates a text node for the string value that can be inserted into the document tree,...
Q_WEAK_OVERLOAD ParseResult setContent(const QByteArray &data, ParseOptions options=ParseOption::Default)
QDomElement documentElement() const
Returns the root element of the document.
QDomElement createElement(const QString &tagName)
Creates a new element called tagName that can be inserted into the DOM tree, e.g.
QString toString(int=1) const
Converts the parsed document back to its textual representation.
void setAttribute(const QString &name, const QString &value)
Adds an attribute called name with value value.
static void setInvalidDataPolicy(InvalidDataPolicy policy)
QDomNode firstChild() const
Returns the first child of the node.
QDomText toText() const
Converts a QDomNode into a QDomText.
QDomNode appendChild(const QDomNode &newChild)
Appends newChild as the node's last child.
void close() override
Calls QFileDevice::flush() and closes the file.
bool open(OpenMode flags) override
Opens the file using OpenMode mode, returning true if successful; otherwise false.
\macro QT_RESTRICTED_CAST_FROM_ASCII
QChar * data()
Returns a pointer to the data stored in the QString.
AudioChannelLayoutTag tag
GLboolean GLboolean GLboolean GLboolean a
[7]
#define qPrintable(string)
void XML_snippet_main()
[0]