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: Hello World]] This outputs "Hello" (without the bold tags or "world":
Hello World 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?
The solution is to encode the HTML (which the XML tools in .NET will automatically do for you if you're accessing the resource file via the DOM). e.g., <b>Hello</b> World
None
0 Points
2 Posts
How to embed inline XML/HTML in a Resx file?
Feb 01, 2005 12:37 PM|JeremyCaney|LINK
None
0 Points
2 Posts
Re: How to embed inline XML/HTML in a Resx file?
Feb 01, 2005 02:34 PM|JeremyCaney|LINK
None
0 Points
271 Posts
Re: How to embed inline XML/HTML in a Resx file?
Mar 16, 2005 02:57 AM|quentin.despierres|LINK