This macro is designed to help people who work with and around XML, so that they may format there xml documents, to make it easier to read and analyse.
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.
Version 1.2: updated (February 20, 2008)