Hello
I am developing an application in C #, when I create an xml file.
My question : I wold like create an xml file with CDATA section like
<BALISE name="Atrubute"> data ]]> BALISE>
best regard
Hello
I am developing an application in C #, when I create an xml file.
My question : I wold like create an xml file with CDATA section like
<BALISE name="Atrubute"> data ]]> BALISE>
best regard
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
ido shaharPosted May 19, 2009, 3:27 AM
it is!
look at the example that located in the MSDN: (http://msdn.microsoft.com/en-us/library/system.xml.xmldocument.createcdatasection.aspx)
using System;
" +Pride And Prejudice " +
using System.IO;
using System.Xml;
public class Sample
{
public static void Main()
{
XmlDocument doc = new XmlDocument();
doc.LoadXml("
"
"");
//Create a CData section.
XmlCDataSection CData;
CData = doc.CreateCDataSection("All Jane Austen novels 25% off starting 3/23!");
//Add the new node to the document.
XmlElement root = doc.DocumentElement;
root.AppendChild(CData);
Console.WriteLine("Display the modified XML...");
doc.Save(Console.Out);
}
}
Posted May 18, 2009, 2:20 PM
this function
cxml.CreateCDataSection("content of cdata");
does not exist in system.xml ?
ido shaharPosted May 18, 2009, 12:19 PM
XmlDocument cxml = new XmlDocument();
cxml.CreateCDataSection("content of cdata");
????????????????????????