My solution for the time being: use JSON for the value.
Can I store an xml string in a resources file (.resx), without it getting encoded with < and >?
Question
In Visual Studio, I can put an xml string into the "Value" field. However, when I open up the actual .resx file, I see that it has been encoded to have <
and >
. I want the .resx file to be able to be edited manually without using the Visual Studio UI, and obviously this is messy with the >
and <
s. Could I somehow do this without the encoding?
Solution
OTHER TIPS
I'm not sure if this is what you're looking for, but I usually wrap values in my resx files in CDATA
if I don't want to deal with <
and >
. Of course this is a mess too if you have CDATA
in your xml string. Also as soon as you edit with the Visual Studio UI again, it will revert back to <
>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow