Page 1 of 1

Formatting Options

Posted: Thu Aug 18, 2022 4:59 pm
by Idrees
Hello, is there a way to edit formatting options to prevent the following:

Code: Select all

 <Tag name="Test"><Value><Test/></Value></Tag>
from being formatted as follows

Code: Select all

 <Tag name="Test"><Value>
                  <Test/>
               </Value></Tag>

Re: Formatting Options

Posted: Fri Aug 19, 2022 12:44 am
by Idrees
Ah, it seems Editor/Format/XML/Elements Spacing is what I was looking for

Re: Formatting Options

Posted: Fri Aug 19, 2022 7:51 am
by Radu
Hi,

When it comes to considering an element space-preserve and not chancing it at all during "Format and indent", Oxygen also looks in the DTD/schema associated to the XML to see if the element has an xml:space="preserve" default attribute value set in the schema. So if you control the contents of the DTD/schema referenced by the XML, you could also mark the element in the schema as having the xml:space="preserve" default attribute value.

Regards,
Radu