Tech
Forums
Jobs
Books
Events
Live
Interviews
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
1
Reply
Add CData Section to existing xml string
Madhu Jayapal
Jan 19 2011 2:06 AM
13.8k
Reply
Hi Guys,
Requirement is to add CData section to existing XML string of below format
<ContactSet>
<Contacts>
<Contact>
<ContactID>33493</ContactID>
<CustomerID>6663</CustomerID><Fax />
<EmailID>
[email protected]
</EmailID>
<DateNoMailRequested>1970-01-01T05:30:00</DateNoMailRequested>
<Password>nJzVu@{YxE3</Password>
<Phone>918043510100</Phone>
<Summary>Hi!, Awaiting for your reply. Thanks & Regards</Summary>
</Contact>
</Contacts>
</ContactSet>
Required output is to be like this
<ContactSet>
<Contacts>
<Contact>
<ContactID><![CDATA[33493]]></ContactID>
<CustomerID><![CDATA[6663]]></CustomerID><Fax />
<EmailID><![CDATA[
[email protected]
]]></EmailID>
<DateNoMailRequested><![CDATA[1970-01-01T05:30:00]]></DateNoMailRequested>
<Password><![CDATA[nJzVu@{YxE3]]></Password>
<Phone><![CDATA[918043510100]]></Phone>
<Summary><![CDATA[Hi!, Awaiting for your reply. Thanks & Regards]]></Summary>
</Contact>
</Contacts>
</ContactSet>
Basically without CData section when i try to load xml string into XDocument, .net is giving hex decimal parsing error.
Hoping adding CData section will solve the problem.
Awaiting for reply
Thanks in advance
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
1
)
Next Recommended Forum
C# Updater (Using Webclient)
C# - Fetch Novell login info