开发者

how to load string with special characters in to XElement?

开发者 https://www.devze.com 2022-12-14 16:08 出处:网络
I am trying to load an XML which 开发者_开发技巧has special characters such as ö and ® into XElement. But I get an error saying \"Invalid character in the given encoding\". Where do I set the encodi

I am trying to load an XML which 开发者_开发技巧has special characters such as ö and ® into XElement. But I get an error saying "Invalid character in the given encoding". Where do I set the encoding so that I will be able to load the string?


You could set the encoding in the first line of the XML file:

<?xml version="1.0" encoding="utf-8"?>

Could you show your XML file?

0

精彩评论

暂无评论...
验证码 换一张
取 消