Can you clarify which member of the BladeLogic Family of products you are referring to, and some example of the configuration files the question is about.
This will improve the chances of getting a helpful response from the community.
Thanks & Regards,
Thanks for your response.
We're using BladeLogic Server Automation (Version: 8.3.00.115)
The files are web service web.config files, forms based application config files etc, some of which are rather large.
It really depends on the structure and type of config file. If you need to fix indentation, you need something that can parse the file and understand how it's supposed to be indented in the first place. If you could attach a sample of that web.config file I could take a look and possibly provide a better answer. There's no "generic one size-fits-all" solution for this kind of thing.
I've attached a sample config file which I have formatted manually. Our actual configs are usually a lot larger.
The problem with the formatting is in part historic (i.e. when making manual changes people have not used correct formatting/indentations) and I'm hoping that future deployments using BladeLogic will allow us to tidy things up. However I have noticed that sometimes Blade Logic is messing up the formatting.
Thanks for any advice you can offer.
formatted.config 5.6 K
1 of 1 people found this helpful
Are your application server(s) running on Windows, Solaris or Red Hat?
Since this is simple XML, you can use the command-line utility Tidy, which works on both Windows and Linux, as shown by the second example of this KB: XML formatting Indentation Tags Matching - Linux - Stack Overflow
If you are using Red Hat, you can install Tidy using this command after installing the RPM Forge repository (AdditionalResources/Repositories/RPMForge - CentOS Wiki): yum install tidy
If you are using Windows, you can get it here: HTML Tidy Project Page
Once you have that, you can then use a NSH Script Job (Type 2) to fix the XML of your config files by using the tidy command-line installed on the application server.
Thanks for the advice and apologies for responding (I've been off work)
We have a combination of Windows and Linux servers, mostly Windows.
I will give your suggestion a try