Following the Code:-
XPathNavigator nav = MainDataSource.CreateNavigator();
XPathNavigator rtfNav = nav.SelectSingleNode("//my:rtfField", NamespaceManager);
XmlDocument doc = new XmlDocument();
XmlElement elm = doc.CreateElement("div", "http://www.w3.org/1999/xhtml");
elm.InnerText = "Line 1";
doc.AppendChild(elm);
rtfNav.AppendChild(doc.DocumentElement.CreateNavigator());
doc = new XmlDocument();
elm = doc.CreateElement("div", "http://www.w3.org/1999/xhtml");
elm.InnerText = "Line 2";
doc.AppendChild(elm);
rtfNav.AppendChild(doc.DocumentElement.CreateNavigator());
XPathNavigator nav = MainDataSource.CreateNavigator();
XPathNavigator rtfNav = nav.SelectSingleNode("//my:rtfField", NamespaceManager);
XmlDocument doc = new XmlDocument();
XmlElement elm = doc.CreateElement("div", "http://www.w3.org/1999/xhtml");
elm.InnerText = "Line 1";
doc.AppendChild(elm);
rtfNav.AppendChild(doc.DocumentElement.CreateNavigator());
doc = new XmlDocument();
elm = doc.CreateElement("div", "http://www.w3.org/1999/xhtml");
elm.InnerText = "Line 2";
doc.AppendChild(elm);
rtfNav.AppendChild(doc.DocumentElement.CreateNavigator());
No comments:
Post a Comment