Notepad++ is an Editor for source format with the following features
- Indentation format
- Syntax Highlight
- Edit files of any type
- file validation
Notepad++, like any other editor, starts as a simple editor, but you can configure and install plugins to get additional features.
XML TOOLS plugin that provides a lot of features validation, format auto comments
How to open xml Files in Notepad++?
The XML file contains tags and strings with rules, So these files can be opened in notepad++ directly, modify and save the files.
It supports opening and reading larger XML files by reading XML content into memory, So Notepad++ throws Out Of Memory Exception If the 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 the
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 a 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 colors.
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 the below steps
Style configurator - Select
With these steps, you can change styles for the 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 an XML schema to validate against and display errors.
If these things are not working, you can check
online XML validators for the desired thing