#includeIn this example, we first create a new QDomDocument object and a root element for it. Then, we create a new child element and add it to the root using appendChild. Finally, we add a text node to the child element using appendChild again. We then print the newly created XML document to the console. This code uses the Qt XML library, which is part of the Qt Core library.int main() { QDomDocument doc; QDomElement root = doc.createElement("root"); doc.appendChild(root); QDomElement child = doc.createElement("child"); root.appendChild(child); QDomText text = doc.createTextNode("Hello, world!"); child.appendChild(text); qDebug() << doc.toString(); return 0; }