Remove <br/"> from xmlnode
My XML might look like this:
<div>
<p>
First Text
<br/>
Second Text
</p>
</div>
Loading an xml file going through all nodes with the following code:
XmlDocument doc = new XmlDocument();
doc.Load(filepath);
foreach (XmlNode row in doc.SelectNodes("/div/p"))
{
string subtext = row.InnerText;
richtextbox.AppendText(subtext + "\n");
}
The result will always look like this:
First TextSecond Text
Now the problem is that there is no space (or even a line break) between the first and second text. So, is there a way to replace this with a <br/>
space / line?
+3
source to share