QDomNodeList children = parentNode.childNodes(); for (int i = 0; i < children.size(); i++) { QDomNode childNode = children.at(i); // Do something with childNode... }
QDomElement elementNode = someNode.toElement(); QString attributeValue = elementNode.attribute("attributeName");
QDomElement newNode = document.createElement("newNode"); QDomText textNode = document.createTextNode("some text"); newNode.appendChild(textNode); parentNode.appendChild(newNode);These examples demonstrate some of the basic functionality provided by QDomNode. The package library is Qt, specifically the Qt XML module.