Returns or sets the XML text of the text range.
Namespace:
C1.Win.XmlEditorAssembly: C1.Win.XmlEditor.2 (in C1.Win.XmlEditor.2.dll)
Syntax
Examples
This code demonstrates the Text and the XmlText properties.
Copy CodeC#
privatevoid button1_Click(object sender, EventArgs e) { c1XmlEditor1.LoadXml("<html><head><title>Document</title></head><body><p>12<span>3</span>456</p></body></html>", new Uri("c:\\")); C1TextRange r = c1XmlEditor1.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(c1XmlEditor1.Text); //Output://1//NewText//56 } |