XCData
In this chapter you will learn:
Create a CData section
The following code
creates an XCData
Node and Passing It As the Value of a Created Element.
using System;//jav a 2 s. c o m
using System.Linq;
using System.Collections;
using System.Collections.Generic;
using System.Xml;
using System.Xml.Linq;
public class MainClass {
public static void Main() {
XElement xErrorMessage = new XElement("HTMLMessage",new XCData("<H1>Invalid password.</H1>"));
Console.WriteLine(xErrorMessage);
}
}
Next chapter...
What you will learn in the next chapter:
Home » C# Tutorial » XML Linq