Formatting Options

Having trouble installing Oxygen? Got a bug to report? Post it all here.
Idrees
Posts: 2
Joined: Tue Aug 16, 2022 7:41 pm

Formatting Options

Post 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>
Idrees
Posts: 2
Joined: Tue Aug 16, 2022 7:41 pm

Re: Formatting Options

Post by Idrees »

Ah, it seems Editor/Format/XML/Elements Spacing is what I was looking for
Radu
Posts: 9046
Joined: Fri Jul 09, 2004 5:18 pm

Re: Formatting Options

Post 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
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Post Reply