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.
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
PluginsMenu and select
- In Search box, Type pretty XML and Check XML Tools Checkbox, click on Install.
This installs XML plugins in Notepad
Open XML file in Notepad++
Pretty Print - Indent attributesor
Pretty Print - Indent onlyoption or you can choose shortcut key
You can see the below image for more options
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
Style configurator - Select
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