XML Indentation

Post here questions and problems related to oXygen frameworks/document types.
Isabelle
Posts: 58
Joined: Fri Jan 20, 2017 1:11 pm

XML Indentation

Post by Isabelle » Thu May 17, 2018 1:30 pm

Hello,

We use oxygen-18.1.0.0.jar, and we need to change the XML indentation options.

Currently when we open a document in our application, the indentation is automatically done.
The problem is that we have xml tag on multiple line like this

Code: Select all

<multimedia id="XXX">
<multimediaObject
infoEntityIdent="XXX"
multimediaType="XXX" id="XXX">
<parameter id="XXX" parameterIdent="XXX"
parameterName="XXX"
parameterValue="XXX"/>
<parameter id="XXX" parameterIdent="XXX"
parameterName="XXX"
parameterValue="XXX"/>
<parameter id="XXX" parameterIdent="XXX"
parameterName="XXX" parameterValue="XXX"/>
<parameter id="XXX" parameterIdent="XXX"
parameterName="XXX" parameterValue="XXX"/>
<parameter id="XXX" parameterIdent="XXX"
parameterName="XXX" parameterValue="XXX"/>
<parameter id="XXX" parameterIdent="XXX"
parameterName="XXX" parameterValue="XXX"/>
<parameter id="XXX" parameterIdent="XXX"
parameterName="XXX" parameterValue="XXX"/>
<parameter id="XXX" parameterIdent="XXX"
parameterName="XXX" parameterValue="XXX"/>
<parameter id="XXX" parameterIdent="XXX"
parameterName="XXX" parameterValue="XXX"/>
</multimediaObject>
</multimedia>
And what we want is more like this :

Code: Select all

<multimedia id="XXX">
<multimediaObject infoEntityIdent="XXX" multimediaType="XXX" id="XXX">
<parameter id="XXX" parameterIdent="XXX" parameterName="XXX" parameterValue="XXX"/>
<parameter id="XXX" parameterIdent="XXX" parameterName="XXX" parameterValue="XXX"/>
<parameter id="XXX" parameterIdent="XXX" parameterName="XXX" parameterValue="XXX"/>
<parameter id="XXX" parameterIdent="XXX" parameterName="XXX" parameterValue="XXX"/>
<parameter id="XXX" parameterIdent="XXX" parameterName="XXX" parameterValue="XXX"/>
<parameter id="XXX" parameterIdent="XXX" parameterName="XXX" parameterValue="XXX"/>
<parameter id="XXX" parameterIdent="XXX" parameterName="XXX" parameterValue="XXX"/>
<parameter id="XXX" parameterIdent="XXX" parameterName="XXX" parameterValue="XXX"/>
<parameter id="XXX" parameterIdent="XXX" parameterName="XXX" parameterValue="XXX"/>
</multimediaObject>
</multimedia>
Is it possible to change the indentation's option in order to increase the number of characters allowed on a line ?

Thanks,
Regards,
Isabelle

Radu
Posts: 6511
Joined: Fri Jul 09, 2004 5:18 pm

Re: XML Indentation

Post by Radu » Thu May 17, 2018 2:07 pm

Hi Isabelle,

You can probably set an option like this:

Code: Select all

PluginWorkspaceProvider.getPluginWorkspace().setGlobalObjectProperty("editor.line.width", 400);
to increase for example the max line width to 400.
Or export some changed options from an Oxygen standalone installation as XML and then ship these fixed XML options with the component.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com

Isabelle
Posts: 58
Joined: Fri Jan 20, 2017 1:11 pm

Re: XML Indentation

Post by Isabelle » Thu May 17, 2018 6:54 pm

Hi Radu,

Thanks you for your answer.
It works fine.

Regards,
Isabelle

Post Reply