how to load string with special characters in to XElement?
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?
精彩评论