XML Tip: Using the XML Tools plug-in for Notepad++ to Format Messy XML

I frequently find in working with XML in SC 2012 Operations Manager (SCOM), Service Manager (SCSM) and Orchestrator (SCO) that I find myself facing poorly formatted XML, making it difficult to work with. In fact, the norm in Orchestrator in many cases is XML is presented in a single line of code.

Fortunately, you can fix this with Notepad++, a freeware XML editor available at http://notepad-plus-plus.org/.

Notepad++ comes with a number of plugins, one of which is the XML Tools plugins, which will nicely format your messy XML.

To Reformat Your XML File

First, install the XML Tools from the Plugins –> Plugin Manager –> Show Plugin Manager

image

Check the box by XML Tools, then click the Install button.

image

Then, you can use the Pretty print (XML only – with line breaks) menu option to format your XML.

image

In the case of the Invoke Web Service activity in Orchestrator, this option changes the single line input by Format Hint (which is impossible to work with), from this:

image

to this

image

On a side note, Notepad++ is a decent PowerShell editor in a pinch!

One thought on “XML Tip: Using the XML Tools plug-in for Notepad++ to Format Messy XML

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.