How do I indent and beautify XML source code?

Having trouble installing Oxygen? Got a bug to report? Post it all here.
pstein
Posts: 17
Joined: Wed May 21, 2008 9:13 pm

How do I indent and beautify XML source code?

Post by pstein »

Given a XML source file I want to make the code more readable and beautiful.
Is there a menu which let me do this in Oxygen ?

Peter
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Re: How do I indent and beautify XML source code?

Post by sorin_ristache »

Hello,

Run the action Format and Indent available on the toolbar Document and on the menu Document -> XML Document. You can configure this action with the user preferences available from menu Options -> Preferences -> Editor -> Format -> XML.


Regards,
Sorin
pstein
Posts: 17
Joined: Wed May 21, 2008 9:13 pm

Re: How do I indent and beautify XML source code?

Post by pstein »

Fine.

...and how/where do I specify that the indend from level to level is (only) 2 blanks (and not 3 as currently by default).?

Peter
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Re: How do I indent and beautify XML source code?

Post by sorin_ristache »

The indent size is set with the preference Indent size available from Options -> Preferences -> Editor -> Format. The format and Indent action is explained in a dedicated section of the User Manual available in the application from menu Help -> Help.


Regards,
Sorin
Post Reply