C#使用xml文档作为数据源 Name cannot begin with the ' ' character, hexadecimal value 0x20

程序中使用xml文件作为数据源,出现错误

  Name cannot begin with the ' ' character, hexadecimal value 0x20

是因为xml文件中 出现 特殊字符 < LineBreak/ >

 

在中间有空格 所以出现上面的错误,改正方法为

<LineBreak/>

 

 

在xml文档中 &lt; 标识"<"

&gt;  标识 为 “>”

你可能感兴趣的:(character)