Of course, exactly how you create these parsers and load files into them will depend on which parser you are using and what language you use to write your programs. For this example, I’ve used the MSXML parser from Microsoft. You could use this parser on either the client or the server. I decided to write the examples using Active Server Pages (ASP) in VBScript.
It is easy to create a DOM parser in ASP. Here’s how you’d load a schema document, for example,
<% set schemaDocument = Server.CreateObject(“MSXML2.DOMDocument”) schemaDocument.async=false schemaDocument.load(server.mapPath(“schema.xml”)) %>
The set keyword is necessary because the schemaDocument variable is an object reference. Without it, VBScript will try to assign ...