XmlWriter和XmlDocument都可以完成你需要的功能.具体怎么做查MSDN.^_^

解决方案 »

  1.   

    that doesn't look like standard XML to me, it should be something like<xml xmlns:v="urn:schemas-microsoft-com:vml">
       <v:rect ....>
       </v:rect>
    </xml>
    then you just need to useXmlElement e = doc.CreateElement("v","rect","urn:schemas-microsoft-com:vml");
      

  2.   

    sorry,应该是
    <xml xmlns:v="urn:schemas-microsoft-com:vml">
       <v:rect ....>
       </v:rect>
    </xml>
    的,,,,
    那<xml xmlns:v="urn:schemas-microsoft-com:vml">这一句怎么创建阿
      

  3.   

    try
    XmlDocument doc = new XmlDocument();
    XmlElement e = doc.CreateElement("xml");
    e.SetAttribute("xmlns:v", "urn:schemas-microsoft-com:vml");
    doc.AppendChild(e);
    XmlElement e2 = doc.CreateElement("v","rect","urn:schemas-microsoft-com:vml");
    e.AppendChild(e2);
    doc.Save(Console.Out);
      

  4.   

    还有....
    我这个xml会被html文件调用,到时候会显示出来图形吧,刚接触xml,vml,谢谢指点
      

  5.   

    >>>到时候会显示出来图形吧这由浏览器决定,自IE5起,都应该支持VML的Frequently Asked Questions About VML
    http://msdn.microsoft.com/library/default.asp?url=/workshop/author/VML/vmlfaq.asp
      

  6.   

    谢谢你了,,思归MVP,,,,,
    我的msn:
    [email protected]
    希望多多交流。。