怎么用createProcessingInstruction创建的指令完成了一半啊?

Set DOMd= New MSXML2.FreeThreadedDOMDocument30
Set objPI = DOMd.createProcessingInstruction("xml", "version=""1.0"" encoding=""GB2312""")
DOMd.insertBefore objPI, DOMd.childNodes(0)
Set objPI = Nothing
结果是:

而我要的结果是:

环境:VB6+XML3.0
怎么回事啊?为什么不能得到encoding设置?
---------------------------------------------------------------

Set DOMd= New MSXML2.FreeThreadedDOMDocument30
Set objPI = DOMd.createProcessingInstruction("xml", "version=""1.0"" encoding=""GB2312""")
DOMd.insertBefore objPI, DOMd.childNodes(0)
Set objPI = Nothing
DOMd.save "c:\test.xml"

Published At
Categories with Web编程
Tagged with
comments powered by Disqus