I asked this question yesterday and received an answer.
Writing encoded values for umlauts
The code uses the parse method if it is like a string:
XDocument xDoc = XDocument.Parse("<description>Top Shelf-ÖÄÜookcase</description>");
To pass the input xml file as a string, I must first read it. The read method will not work if there is umlauts in the input xml. How do I get past this?
Tried the Load and Parse XDocument methods.
Load: Invalid character in this encoding. Line 3, position 35. Parse: Data at the root level is invalid. Line 1, position 1.
Here is an xml example after using CDATA:
<?xml version="1.0" encoding="utf-8"?> <kal> <description><![CDATA[Top Shelf-ÖÄÜookcase]]> </description> </kal>
source share