1
如何在我的xml中创建这一行? (问题是命名空间) 如何添加简单的名称空间?
的关闭我来是这样的:
XDocument doc = new XDocument();
XElement root = new XElement("root",
new XAttribute("name", Name),
new XAttribute(XNamespace.Xmlns, Namespace)//<-- XNamespace.Xmlns is not good
);
我已经tryed新XAttribute(“的xmlns”,命名空间)也,但我只是不明白这一点。