Validation is the process of testing XML documents and schemas to ensure that they follow the rules of the language. After writing an XML document, you should check to ensure that it is well-formed; that is, the document must adhere to the syntax rules I've already discussed. The process of testing a document's form is analogous to compiling a VBA program. When your VBA program contains syntax errors, you receive a compile error and the debugger is invoked. When your XML document is not well-formed, a good XML editor will display an error message and highlight the section of the document containing the error.
Although you can use simple text editors such as Notepad for creating XML documents, these editors cannot validate your code. Instead, I recommend you find a dedicated XML editor if you intend to spend any time developing applications that rely on XML documents. Alternatively, you can find XML validation tools on the internet. One such validation tool can be found at http://www.w3schools .com/dom/dom_validate.asp.
Was this article helpful?