Line breaks in XML

Hello,

I’m wondering what the easiest way of putting line breaks into a string in an xml tag would be. i’m using XML.getValue() on the following tag:

  
<TEXT1>THIS IS THE TEXT\nSECOND LINE</TEXT1>  

which just renders the \n alongside the other text.

  
<TEXT1>THIS IS THE TEXT  
SECOND LINE</TEXT1>  

which ignores the line break.

and (rather optimistically)

  
<TEXT1>THIS IS THE TEXT<br>SECOND LINE</TEXT1>  

which only grabs the first line.

Is this an encoding thing?

Andy

So the following worked:

  
<TEXT1><![CDATA[TEXT  
ON  
DIFFERENT  
LINES]]</TEXT1>  

Not particularly elegant.

You’re missing a >, that should be :

<TEXT1><![CDATA[TEXT  
ON  
DIFFERENT  
LINES]]></TEXT1>