以文本方式查看主题

-  中文XML论坛 - 专业的XML技术讨论区  (http://bbs.xml.org.cn/index.asp)
--  『 XML基础 』  (http://bbs.xml.org.cn/list.asp?boardid=1)
----  急急急!请高人帮忙解决vb写xml的问题!  (http://bbs.xml.org.cn/dispbbs.asp?boardid=1&rootid=&id=43448)


--  作者:ermao923
--  发布时间:2/27/2007 11:28:00 AM

--  急急急!请高人帮忙解决vb写xml的问题!
xmlDoc.appendChild xmlDoc.createProcessingInstruction("xml", "version='1.0' encoding='UTF-8'")

Set rootElement = xmlDoc.createElement("Transaction")
xmlDoc.appendChild (rootElement)

Set toElement_Header = xmlDoc.createElement("Transaction_Header")
rootElement.appendChild (toElement_Header)

Set toElement = xmlDoc.createElement("id")
toElement_Header.appendChild (toElement)
Set toElementText = xmlDoc.createTextNode("001")
toElement.appendChild (toElementText)

请问我想写<id type=G>001</id>
怎么写啊?


--  作者:Qr
--  发布时间:2/27/2007 12:06:00 PM

--  
不会VB,到MS的网站去下载MSXML SDK安装就用使用手册了。


--  作者:ermao923
--  发布时间:2/27/2007 1:13:00 PM

--  
哈哈!搞定了,谢谢bz
W 3 C h i n a ( since 2003 ) 旗 下 站 点
苏ICP备05006046号《全国人大常委会关于维护互联网安全的决定》《计算机信息网络国际联网安全保护管理办法》
6,656.250ms