Notepad++ is an Editor for source format with following features

  • Indentation format
  • Syntax Highlight
  • Edit files of any type
  • file validation

Notepad++, like any other editor, starts out as a simple editor, but you can configure and install plugins to get additional features.

Notepad++ has XML TOOLS plugin provides lot of features validation, format auto comments

How to open xml Files in Notepad++?

XML file contains tag and string with rules, So these files can be opened in notepad++ directly, modify and save the files.

It supports to open and read larger XML files by reading XML content into memory, So Notepad++ throws Out Of Memory Exception,If file is in size of GB’s.

How to format XML file in Notepad++

In Notepad++, Following are step by step guide to pretty print xml in Notepad++

  • Click on Plugins Menu and select Plugins Admin
  • In Search box, Type pretty XML and Check XML Tools Checkbox, click on Install.

Beautify format XML in Notepad++

  • This installs XML plugins in Notepad

  • Open XML file in Notepad++

  • Click on Plugins Menu, Select XML Tools -> Pretty Print or Pretty Print - Indent attributes or Pretty Print - Indent only option or you can choose shortcut key CTRL+ALT+Shift+A or CTRL+ALT+Shift+A command.

  • You can see the below image for more options Beautify format XML in Notepad++

  • This formats the XML content with pretty print

How do I enable syntax highlighting for XML files in Notepad++?

Syntax Highlight is an important feature of any Editor for enhancing user readability with text colours.

Notepad++ includes the ability to configure user-defined files with syntax highlighting.

Syntax highlight is already enabled by default in XML.

You can enable by Select Language Menu -> X -> XML and It highlights color syntax for XML files for opened in editor.

You can still configure and change the colors with below steps

Go to Settings -> Style configurator - Select XML language.

With this steps, you can change styles for below things

  • Foreground and background color
  • Change font styles like font-size, Bold,Italic, and Underline
  • Styles for double and single quote text
  • Boolean and number text styles

XML validation with Notepad++

Notepad++ has support for validation of XML file content.

Validation can be done using Plugin Menu -> XML Tools ->Validate option or you can use short cut CTRL+ALT+Shift+M. It asks for XML schema to validate against and display errors.

If this things are not working, you can check online XML validators for desired thing