My XML could look like this:
<div>
<p>
First Text
<br/>
Second Text
</p>
</div>
Loading the 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 obviously is, that there's no space (or even a line break) between the first & second text. So, is there a way to replace that <br/>
with a space/line break?
` and not `
` (self closing). As it stands that is well formed XML. – Daniel Haley Jun 10 '17 at 03:38