After working with a lot of unformatted xml, I find this a very useful tool when trying to visualise the structure.
- Make sure that the macros toolbar is enabled.
- Right click on the toolbar to “Customize Macros”
- Find and add the macro file to the list of available macros.
How to use:
- Highlight the XML that you wish formatted within your document, then click the XMLFormatter Macro button displayed in the Macros toolbar.
- You will be asked if you wish to use tabs or spaces to indent.
- You will then be prompted to specify the spacing/tabs used to indent each child node tag.
- Once you have selected the required indentation the highlighted text will be formatted and rewritten to the document selection.