Line break from TextAsset not working

Hi,

I’m trying to get strings from .xml file (located in Resources folder) and use them as text for TextMesh. It’s done as follows:

File reading:

Dictionary<string, string> strings = new Dictionary<string, string> ();
XmlDocument xmlDoc = new XmlDocument();
TextAsset textFile = Resources.Load<TextAsset> ("fileName");
xmlDoc.LoadXml(textFile.text);
XmlNodeList stringsList = xmlDoc.GetElementsByTagName("string");
foreach (XmlNode stringItem in stringsList) {
	strings.Add (stringItem.Attributes["name"].Value, stringItem.InnerText);
}

Using string:

TextMesh someLabel = some.GetComponent<TextMesh>();
someLabel.text = strings[someName];

Strings are reading and showing correct, except the case when it contains "
" symbols. "
" is working as a regular text part and doesn’t replaced by line break.

If I pass string directly

someLabel.text = "first

second";

it works correct.

Thanks!

Unfortunately, such reading from a XML file can’t be corrected. If you have a character "
", he will be brought so. I asked about it long ago. There are two methods. The first, it in xml to use new line, as:

 <myString1>it's line number 1
 it's line number 2<\myString1>

And second, use this answers from stackoverflow.