O'Reilly logo

Special Edition Using XSLT by Michael Floyd

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Building a Parser

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required