Add CData Section to existing xml string in C#

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
Hi,
I have some string xml below like
sample 1:
<RESULT><br/>
<ID>222823</ID><br/>
<NAME>test1 </NAME><br/>
<DESC>TEST1 DESC <DESC> <br/>
<RESULTEXTEND><br/>
<ID>257677</ID><br/>
<NAME>test2 </NAME><br/>
<DESC>TEST2 DESC <DESC><br/>
</RESULTEXTEND><br/>
</RESULT>
sample 2:
<RESULT><br/>
<ID>222823</ID><br/>
<NAME>test<&>1 </NAME><br/>
<DESC>TEST1 DESC <DESC> <br/>
<RESULTEXTEND><br/>
<ID>257677</ID><br/>
<NAME>test<&>2 </NAME><br/>
<DESC>TEST2 DESC <DESC><br/>
</RESULTEXTEND><br/>
</RESULT>
// the below code is working fine using sample1 data
string str=sample1 data;<br/>
XmlDocument dom = new XmlDocument();<br/>
dom.LoadXml(str);
// the below code is not working fine using sample2 data
string str=sample1 data;<br/>
XmlDocument dom = new XmlDocument();<br/>
dom.LoadXml(str);
<br/>
please provide solution for this issue.
<br/>
Thanks,<br/>
Suresh
<span style="color:#008000; font-size:small <span style="color:#008000; font-size:small
<span style="color:#008000; font-size:small <span style="color:#008000; font-size:small <span style="color:#0000ff; font-size:small <span style="color:#0000ff; font-size:small


<span style="font-size:small <span style="font-size:small <span style="font-size:small
<a> <a> <a> <a> <a> <a> <a> <a> <a> <a>


View the full article
 
Back
Top