Indent XML Formatting In Notepad++


XML files are really hard to read if not in proper indentations. An easy way to do so is by using text editors like sublime and notepad++.

If you have an XML file with data unformatted, notepad++ is a great tool to format (indent or prettify) your XML file contents.

But the XML formatting plugin is not added to notepad++ by default. So you need to download libXML2-based plugin called XML tools

Downloading XML tools plugin:

  1. Go to notepad++ menu, under Plugins -> Plugin Manager -> Show plugin Manager.
  2. Now look for XML tools and tick the respective check-box, and Download the plugin.
  3. You will be asked to restart notepad++ after the plugin is installed to take effect.

Lets test the xml plugin:

Open your XML file that needs to be formatted.

Now go to Plugins -> Plugin Manager -> XML Tools -> Pretty Print (XML Only), you will see that the data of the xml file is now well formatted.

Pretty print XML in Notepad++ using XML tools.png
Pretty print XML in Notepad++ using XML tools.png
Result - XML file Prettified using Notepad++.png
Result - XML file Prettified using Notepad++.png
Advertisements
Try Out Code2care Dev Tools:

Advertisements

Advertisements
Code2care is an initiative to publish and share varied knowledge in programming and technical areas gathered during day-to-day learnings and development activities.

Students and software developers can leverage this portal to find solutions to their various queries without re-inventing the wheel by referring to our easy to understand posts. Technical posts might include learnings, tutorials, trouble-shooting steps, video tutorials, code snippets, how-to, blogs, articles, etc.

🎉 We are celebrating the 10th years of Code2care! Thank you for all your support!

We strongly support Gender Equality & Diversity.