Name cannot begin with the ' ' character

后端 未结 9 1322
抹茶落季
抹茶落季 2021-01-01 08:57

I\'m parsing some XML in C#. I\'m getting it from a database, and so converting it to a MemoryStream before reading it with an XmlTextReader. The problem is that I get this

9条回答
  •  青春惊慌失措
    2021-01-01 09:23

    I had a lot of errors because of this. Make sure you don't have spaces. There are two places I removed spaces that worked for me.

    Was:

    xmlns: xsi="http://www.w3.org/2001/XMLSchema-instance"
    

    What worked:

    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    

    There was a space here too: < abc:def >. Remove all the spaces around the < and the >.

提交回复
热议问题