[]
        
(Showing Draft Content)

C1.Win.C1Editor.C1TextRange.XmlText

XmlText Property

XmlText

Returns or sets the XML text of the text range.

Declaration
public string XmlText { get; set; }
Examples

This code demonstrates the Text and the XmlText properties.

 private void button1_Click(object sender, EventArgs e)
{
c1Editor1.LoadXml("<html><head><title>Document</title></head><body><p>12<span>3</span>456</p></body></html>", new Uri("c:\"));
C1TextRange r = c1Editor1.CreateRange();
r.Move(1, 3);
Console.WriteLine(r.Text);
// Output: 234
Console.WriteLine(r.XmlText);
// Output: <p xmlns="http://www.w3.org/1999/xhtml">2<span>3</span>4</p>
r.XmlText = "<div style="border: solid 1px black">New Text</div>";
Console.WriteLine(c1Editor1.Text);
//Output:
//1
//NewText
//56
}