Struts Console uses an XML parser to read in XML configuration files, and then it manipulates the files in memory. Because XML parsers do not retain all of a file's original formatting when the file is parsed, the files are often poorly formatted when they are saved. By default, Struts Console simply preserves the in-memory representation of configuration files, which results in poorly formatted XML files. To get around the limitation of XML parsers not retaining complete formatting information, Struts Console has a feature called Pretty Output that allows the format configuration of an XML file to be saved.
The Pretty Output options can be configured in the stand-alone version of Struts Console as well as from inside IDEs that Struts Console plugs into. (For information on how to access the configuration settings for the Pretty Output options in a supported IDE, see that IDE's section in this appendix.) To configure the Pretty Output options in the stand-alone version of Struts Console, select Options | Output. This opens the dialog box shown here with options for specifying the details of how XML files should be formatted when they are saved.
Following is an explanation of each of the output options:
Enable Pretty Output Enables and disables the use of Pretty Output options.
Newlines Specifies the type of newline character to use. System Default is the default and recommended setting. System Default defaults to the newline character for the given system on which the application is running. For example, if run on Windows, System Default uses Windows-style newline characters.
Lines Between Elements Specifies the number of new lines to place in between tags.
Indent Elements Specifies the number and type of indenting to use. Indenting is used for tags and is hierarchical. Each level in the tag hierarchy is a level of indenting.
Attributes on New Lines Specifies whether a tag's attributes should each be placed on a new line or if each should be placed on the same line as the tag.
Expand Empty Elements Specifies whether or not empty tags (that is, tags without nested tags) should be expanded (e.g., <tag/> versus <tag></tag>).
Bottom pane Shows an example of how the output will look with the current output options applied. This changes as you change the output options.
Enabling Pretty Output removes any XML comments (e.g., <!-- -->) and formatting from your original configuration files.