// Assuming the XML document contains the following element: //In this example, we create a QDomDocument object and set its content to an XML string. We then get a reference to the root element of the document and output the value of the nodeName property, which is "person". Package library: QtCore library, which is part of the Qt package.QDomDocument doc; doc.setContent(xml); // parse XML string QDomElement person = doc.documentElement(); qDebug() << person.nodeName(); // Output: "person"