Format and Indent options, preserving newlines in XML
Posted: Tue Jan 27, 2009 8:57 pm
Hi,
I'm having trouble figuring out which Editor / Format / XML options I need to set/unset to preserve new line characters between tags.
Say I start with this code:
Ideally I'd like the result to look like this:
But what ends up happening is that the formatting tool gives me this:
This is still valid XML but these changes actually make things difficult to edit and parse with non-XML aware tools like grep. So I'd like the formatting tool to do something, I don't want to preserve the text, but I don't want it to get rid of the new lines.
Is there an option for this?
Thanks
I'm having trouble figuring out which Editor / Format / XML options I need to set/unset to preserve new line characters between tags.
Say I start with this code:
Code: Select all
<tag>
a1
b2
c3
</tag>
Code: Select all
<tag>
a1
b2
c3
</tag>
Code: Select all
<tag> a1 b2 c3 </tag>
Is there an option for this?
Thanks