I am reading and writing Java Properties files in XML format. Many of the property value have HTML embedded, which developers wrap in [[CDATA
elements like so:
<entry key="foo"><![CDATA[
<b>bar</b>
]]></entry>
However, when I use the Java API to load these properties and later write them back to XML, it doesn't wrap these entries in CDATA elements, but rather escapes the tags, like so:
<entry key="foo"><b>bar</b></entry>
Are these two formats equivalent? Am I introducing any potential problems by replacing CDATA with escaped tags?