considera che ho appena inizato a usarlo quindi non so se è il modo corretto, cmq:
codice:
Public Doc As DOMDocument
Public Paperopoli As IXMLDOMElement
Public Paperino As IXMLDOMElement
Public Nipoti As IXMLDOMElement
.
.
function CreaXML()
Set Doc = New DOMDocument
Set Paperopoli = Doc.createNode(NODE_ELEMENT, "Paperopoli", "")
Set Paperino = Doc.createNode(NODE_ELEMENT, "Paperino", "")
Set Nipoti = Doc.createNode(NODE_ELEMENT, "Nipoti", "")
Doc.appendChild Paperopoli
Paperopoli.appendChild Paperino
Paperino.appendChild Nipoti
Nipoti.setAttribute "primo", "quo"
Nipoti.setAttribute "secondo", "qui"
Nipoti.setAttribute "terzo", "qua"
CreaXML=Doc.xml
end function