Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » XML Schema Definition (XSD) » How to indent/reformat XML/XSD tags according to their hierarchy level?
How to indent/reformat XML/XSD tags according to their hierarchy level? [message #509453] Fri, 22 January 2010 13:31 Go to next message
Ben Stover
Messages: 104
Registered: January 2010
Senior Member
Sometimes I would like to re-format a given XML/XSD file so that the tags indented according to their hierarchy level.
For each level 2 blanks should be inserted at the beginning of a line..

How can I achieve this pretty print?

Ben
Re: How to indent/reformat XML/XSD tags according to their hierarchy level? [message #509456 is a reply to message #509453] Fri, 22 January 2010 13:43 Go to previous messageGo to next message
Ed Merks is currently offline Ed Merks
Messages: 26089
Registered: July 2009
Senior Member
Ben,

Have a look at how XSDResourceImpl.doSerialize does that.


Ben wrote:
> Sometimes I would like to re-format a given XML/XSD file so that the
> tags indented according to their hierarchy level.
> For each level 2 blanks should be inserted at the beginning of a line..
>
> How can I achieve this pretty print?
>
> Ben
Re: How to indent/reformat XML/XSD tags according to their hierarchy level? [message #509466 is a reply to message #509456] Fri, 22 January 2010 14:22 Go to previous messageGo to next message
Ben Stover
Messages: 104
Registered: January 2010
Senior Member
Thank you but I don't want to do reformatting programmatically but I want to click a menu somewhere in Eclipse IDE and get a file visually reformatted.

Is this possibel?
Re: How to indent/reformat XML/XSD tags according to their hierarchy level? [message #509476 is a reply to message #509466] Fri, 22 January 2010 14:41 Go to previous message
Ed Merks is currently offline Ed Merks
Messages: 26089
Registered: July 2009
Senior Member
Ben,

I thought WTP supported something like that.


Ben wrote:
> Thank you but I don't want to do reformatting programmatically but I
> want to click a menu somewhere in Eclipse IDE and get a file visually
> reformatted.
>
> Is this possibel?
Re: How to indent/reformat XML/XSD tags according to their hierarchy level? [message #604464 is a reply to message #509456] Fri, 22 January 2010 14:22 Go to previous message
Ben Stover
Messages: 104
Registered: January 2010
Senior Member
Thank you but I don't want to do reformatting programmatically but I want to click a menu somewhere in Eclipse IDE and get a file visually reformatted.

Is this possibel?
Re: How to indent/reformat XML/XSD tags according to their hierarchy level? [message #604467 is a reply to message #604464] Fri, 22 January 2010 14:41 Go to previous message
Ed Merks is currently offline Ed Merks
Messages: 26089
Registered: July 2009
Senior Member
Ben,

I thought WTP supported something like that.


Ben wrote:
> Thank you but I don't want to do reformatting programmatically but I
> want to click a menu somewhere in Eclipse IDE and get a file visually
> reformatted.
>
> Is this possibel?
Previous Topic:How to indent/reformat XML/XSD tags according to their hierarchy level?
Next Topic:[Announce] Eclipse/OMG Symposium 2010
Goto Forum:
  


Current Time: Thu Oct 02 14:50:12 GMT 2014

Powered by FUDForum. Page generated in 0.06764 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software