
December 16th, 2012, 04:40 PM
|
 |
Code Monkey V. 0.9
|
|
Join Date: Mar 2005
Location: A Land Down Under
|
|
The proper, and best, way to do it requires you to change your structure slightly so that the "content" value is the content between the <user> and </user> tags. This will let you use CDATA to enclose the HTML values so that you're guaranteed that there's no issues.
Code:
<user user_Id="1"
name="Name1"
designation="Webdeveloper">
<![CDATA[<b>Hi how are you doing?</b>]]>
</user>
Using <![CDATA[ and ]]> basically tells the XML parser that everything inside this area is to be used exactly as it's written.
|