IT Community - Software Programming, Web Development and Technical Support

How to write contents as CDATA in XML using c#?

This is a discussion on How to write contents as CDATA in XML using c#? within the C# Programming forums, part of the Software Development category; How to write contents as CDATA in XML using c#? You can add the CDATA section using the XmlDocument's ...


Go Back   IT Community - Software Programming, Web Development and Technical Support > Software Development > C# Programming

Register FAQ Members List Calendar Mark Forums Read
  #1 (permalink)  
Old 07-17-2007, 10:57 PM
Archer Archer is offline
D-Web Programmer
 
Join Date: Jun 2007
Posts: 52
Archer is on a distinguished road
Default How to write contents as CDATA in XML using c#?

How to write contents as CDATA in XML using c#?

You can add the CDATA section using the XmlDocument's CreateCDataSection
method. See the below example in C#:
XmlDocument doc = new XmlDocument();
doc.LoadXml( docContent );
XmlNode cdataParent = doc.SelectSingleNode( "path to the node where you want
to add the email text" );
cdataParent.AppendChild( doc.CreateCDataSection( cdataContent ) );
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to reload or refresh the contents in div tag ? sureshbabu PHP Programming 1 07-20-2007 07:18 AM
What’s the difference between Response.Write() andResponse.Output.Write()? prasath ASP and ASP.NET Programming 1 07-19-2007 03:56 AM
Cdata raj XML and SOAP 0 07-17-2007 12:11 AM
What are all the contents in test plan? itbarota Software Testing 0 07-16-2007 12:33 AM
CDATA Section in XML vigneshgets XML and SOAP 1 05-30-2007 12:00 PM


All times are GMT -7. The time now is 04:44 PM.


Copyright ©2004 - 2007, DiscussWeb. All Rights Reserved.

SEO by vBSEO 3.0.0