Preserve line breaks in strings parsed from XML
<p>I have alert dialog that shows.. alerts. Alerts are parsed from some xml file (using XmlPullParser), and sometimes they have line breaks like "Foo \nbreak". The problem is that alert is being displayed as <code>"Foo \nbreak"</code>, not like </p>

<pre><code>"Foo
break"
</code></pre>

<p>(Needles to say, that if I just put <code>"Foo \nbreak"</code> directly in dialog - line breaks are displayed properly.)</p>

<p>And I cant even replace that <code>\n</code> with something useful.. So sad. I suppose, xml "normalizes" all text, or something like this. But what should I do to preserve line breaks?</p>
