2
XElement命名空间(如何?)
如何使用节点前缀创建xml文档,例如: <sphinx:docset> <sphinx:schema> <sphinx:field name="subject"/> <sphinx:field name="content"/> <sphinx:attr name="published" type="timestamp"/> </sphinx:schema> 当我尝试运行类似new XElement("sphinx:docset")异常的东西时 未处理的异常:System.Xml.XmlException:名称中不能包含':'字符,十六进制值0x3A。 在System.Xml.XmlConvert.VerifyNCName(字符串名称,ExceptionType exceptionTyp E) 在System.Xml.Linq.XName..ctor(NS的XNamespace,字符串的localName) 在System.Xml.Linq.XNamespace.GetName(字符串的localName) 在系统.Xml.Linq.XName.Get(字符串expandName)
73
c#
xml
linq
namespaces