更新时间:2023-11-24 17:49:04
你应该这样试试
XmlDocument doc = new XmlDocument();
XmlSchema schema = new XmlSchema();
schema.Namespaces.Add("xmlns", "http://www.sample.com/file");
doc.Schemas.Add(schema);
不要忘记包含以下命名空间:
Do not forget to include the following namespaces:
using System.Xml.Schema;
using System.Xml;