Sub mainfun () 'establishment document object model structure Dim oXMLDom' = new ActiveXObject ( "Microsoft.XMLDOM") Set oXMLDom = CreateObject ( "Microsoft.XMLDOM") oXMLDom.async = false 'initialization Xml document, create a root CreateXmlDom oXMLDom, "Electronic Document" DIM Node Set Node = OXMLDOM.SELECTNODES ("/ Electronic Document") .Item (0) 'Add Maji Set Node = appendnode (Oxmldom, Node, "Stylistic", "") Add Properties AppendattributeValue Node , "XMLns", "http://www.xmlspy.com" add child node set node = appendnode (oxmldom, node, "body", "")
Msgbox oxmldom.xml
End Sub