G
Guest
I would like to place XML and/or HTML tags inside an XML Resource (*.resx)
file. This is easy to do within text based resource files; likewise, I would
assume that resx files (being XML based) would support the standard CData
tag. However, when putting a CData tag in a Resx file, I receive a parsing
error during the compilation process (reporting that the CDATA field is not
closed). Conversely, if I just include HTML inline then the ResourceManager
object returns the innertext of the first element as the value. Examples:
This returns an error when running ResGen:
<data Name="ResourceName">
<value><![CDATA[<b>Hello World</b>]]</value>
</data>
This outputs "Hello" (without the bold tags or "world":
<data Name="ResourceName">
<value><b>Hello</b> World</value>
</data>
I haven't researched this extensively, although I did run a couple of
obvious trials and do a due dilligence scan of popular internet resources. I
found a few pages in Japanese referencing similar markup although the
translations provided by google didn't provide me with a coherent solution.
Thoughts?
file. This is easy to do within text based resource files; likewise, I would
assume that resx files (being XML based) would support the standard CData
tag. However, when putting a CData tag in a Resx file, I receive a parsing
error during the compilation process (reporting that the CDATA field is not
closed). Conversely, if I just include HTML inline then the ResourceManager
object returns the innertext of the first element as the value. Examples:
This returns an error when running ResGen:
<data Name="ResourceName">
<value><![CDATA[<b>Hello World</b>]]</value>
</data>
This outputs "Hello" (without the bold tags or "world":
<data Name="ResourceName">
<value><b>Hello</b> World</value>
</data>
I haven't researched this extensively, although I did run a couple of
obvious trials and do a due dilligence scan of popular internet resources. I
found a few pages in Japanese referencing similar markup although the
translations provided by google didn't provide me with a coherent solution.
Thoughts?