例如。这些 xml 标签是否可以接受。
<xml>
<3333>abc</3333>
<ab#$3>def</ab#$3>
</xml>
我的问题是我可以创建整数值标签或带有特殊字符的标签吗?
我试过这个
FileStream fs = new FileStream((filename), FileMode.Append);
XmlWriter w = XmlWriter.Create(fs);
w.WriteStartElement("3454");
并得到以下错误
{System.ArgumentException: Invalid name character in '3454'. The '3' character, hexadecimal value 0x33, cannot be included in a name.
at System.Xml.XmlWellFormedWriter.CheckNCName(String ncname)
at System.Xml.XmlWellFormedWriter.WriteStartElement(String prefix, String localName, String ns)
at System.Xml.XmlWriter.WriteStartElement(String localName)
at WindowsFormsApplication1.Form1.fn_setMapping(SqlString keyString, SqlString column, SqlString value)
谢谢你