Loading xml with encoding UTF 16 using XDocument

后端 未结 3 2063
情话喂你
情话喂你 2021-02-05 00:13

I am trying to read the xml document using XDocument method . but i am getting an error when xml has


3条回答
  •  悲哀的现实
    2021-02-05 01:15

    This code:

    System.IO.File.ReadAllLines(path)
    

    returns an array of strings. The correct code is:

    System.IO.File.ReadAllText(path)
    

提交回复
热议问题