tags:

views:

486

answers:

1

How to format XML node to match the following format? How to add new line / tab?

<Note description = "Dear Sir /Madam, **(insert new line)** **(insert tab)** This is to inform you ..." />

Output:

Dear Sir /Madam,

     This is to inform your that the below mentioned vehicle[s] have attracted ...
+1  A: 

Try

&quot;&#10;Dear Sir /Madam,&#10;&#10;&#9;This is...&quot;

&#10; is line feed, &#9; is tab. &quot; will be replaced with ".

Note that you must tell your XML parser to preserve whitespace. Otherwise, &#10;&#10;&#9; will get converted into a single space.

Aaron Digulla