<?xml version="1.0" encoding="GB2312"?>
 
<Form BackColor="FFFFFF" BorderStyle="1">
    <Table id="1"> 你好 </Table>
</Form>怎样用msxml4。0,生成这样格式的xml文件啊,先谢谢了!

解决方案 »

  1.   

    Dim xml_document As DOMDocument
    Dim values_node As IXMLDOMElementSet xml_document = New DOMDocumentSet pi = xml_document.createProcessingInstruction("xml", "version=""1.0"" encoding=""GB2312""")
    xml_document.insertBefore pi, xml_document.childNodes.Item(0)Set values_node = xml_document.CreateNode(NODE_ELEMENT, "Form", "")values_node.setAttribute "BackColor", "FFFFFF"其它类似了
      

  2.   

    看看这篇
    http://www.yesky.com/20021016/1635180.shtml
      

  3.   

    还有这篇
    http://www.programfan.com/showarticle.asp?id=1939