Parse XML multi line string in Java

Alexei28

New Member
I'm trying to parse a multi line XML attribute in Java using the classic DOM. The parsing is working just fine. However, it's destroying the line breaks so, when I render my parsed string, line breaks get replaced by simple spaces.\[code\]<string key="help_text" value="http://stackoverflow.com/questions/10439274/This is a multi line long text. This should be parsed and rendered in multiple lines" />\[/code\]To get the attribute I'm using:\[code\]attributes.getNamedItem("value").getTextContent()\[/code\]If I just pass a manually typed string to the render method using "\n", the text gets drawn as intended.Any ideas?
 
Back
Top