且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

创建全新的XML节点作为子节点附加到其他节点

更新时间:2023-02-05 20:14:11

这应该有效:

Set newNode= XMLFile.CreateElement("price");
newNode.InnerText = "19.95"
trade.appendChild(newNode)

请注意,变量tradenewNode都应声明为IXMLDOMNode(在库msxml6.dll中定义的类型).

Please note that both variables trade and newNode should be declared as IXMLDOMNode (type defined in the library msxml6.dll).