如何使用节点前缀创建xml文档,如:
<sphinx:docset>
<sphinx:schema>
<sphinx:field name="subject"/>
<sphinx:field name="content"/>
<sphinx:attr name="published" type="timestamp"/>
</sphinx:schema>
Run Code Online (Sandbox Code Playgroud)
当我尝试运行像new XElement("sphinx:docset")
我得到异常的东西时
未处理的异常:System.Xml.XmlException:':'字符,十六进制值0x3A,不能包含在名称中.
在System.Xml.XmlConvert.VerifyNCName(String name,ExceptionType exceptionTyp e)
处System.Xml.Linq.XName..ctor(XNamespace ns,String localName)
处于System.Xml.Linq.XNamespace.GetName(String localName)
at System .Xml.Linq.XName.Get(String expandedName)