130
votes

Can someone explain how to use Notepad++ to validate an xml file against an xsd. There are no options in the "XML Tools" plugin dropdown that provides for specifying an XSD file. The XML plugin is installed properly in the plugins subdir and the 3 DLLs are copied to the Notepad++ EXE subdirectory. Other XML "validation" features work but there is no way to validate against an XSD.

1
i've seen several references (and screenshots) of specifying an XSD to validate an XML file - using Notepad++. for example michigan.gov/documents/cepi/…user2174533
Have u looked at when-others-then-null.blogspot.co.uk/2012/12/… It seems it contains what you need.Shmil The Cat
Using the exact XML & XSD from this example worked and i realized what i was doing wrong. I didn't realize that the {xsi:schemaLocation="foobar.com/invoice invoice.xsd"} was actually reading the XSD from my hard drive from the same subdir as the XML file and validating. Thanks.....user2174533
@Shmil The Cat: How to against a dtd.Farhan Shirgill Ansari
@ShirgillAnsari - For DTD validation the XML must contain the DOCTYPE specifying the DTD in the same directory as the XML. like: <!DOCTYPE XML_ROOT_NODE SYSTEM "thisXMLusesThis.dtd"> then the tool can figure it out.Jesse Chisholm

1 Answers

143
votes
  1. In Notepad++ go to Plugins > Plugin manager > Show Plugin Manager then find Xml Tools plugin. Tick the box and click Install

    enter image description here

  2. Open XML document you want to validate and click Ctrl+Shift+Alt+M (Or use Menu if this is your preference Plugins > XML Tools > Validate Now).
    Following dialog will open: enter image description here

  3. Click on .... Point to XSD file and I am pretty sure you'll be able to handle things from here.

Hope this saves you some time.

EDIT: Plugin manager was not included in some versions of Notepad++ because many users didn't like commercials that it used to show. If you want to keep an older version, however still want plugin manager, you can get it on github, and install it by extracting the archive and copying contents to plugins and updates folder.
In version 7.7.1 plugin manager is back under a different guise... Plugin Admin so now you can simply update notepad++ and have it back.

enter image description here