Also if you think about making a more complex addon you should take a look at the Ace3 framework and other libs that can make the proceess easier and provide you with some functionality you don’t need to code.
And to check if your xml file is valid notepad++ doesn’t do that. It just highlites the syntax. You need to use some validator.
You can try this: https://www.xmlvalidation.com/ just ignore errors about the first line.