本帖最后由 folin296 于 2014-06-19 15:04:49 编辑

解决方案 »

  1.   

    http://msdn.microsoft.com/zh-cn/library/bb675176.aspx
      

  2.   

    http://msdn.microsoft.com/zh-cn/library/bb675176.aspx要使用XmlSerializer来序列化实体类,这个方法好像行不通。
      

  3.   

    http://blog.csdn.net/violet_day/article/details/10012099
      

  4.   


       XNamespace aw = "http://www.xxxx.com";
                XElement root = new XElement("Root",
                    new XAttribute(XNamespace.Xmlns + "ns", "http://www.xxxx.com"),
                    new XElement(aw + "Child", "content")
                );