Parse XML through ASP Re: XML -> Recordset (was: RE: [thelist] XML)

Nicole Parrot nicole at parrot.ca
Fri Jan 18 18:14:23 CST 2002


From: "Ken Kogler" <ken.kogler at curf.edu>
> > I use the MSXML object to parse XML into ASP.
> How? :-)

Something like this? (this applies an XSL onto an XML and outputs the
results. It also loads the XML file into an XMLDOM object, which has
functionality to handle the data afterwards).


  '// Set the source and style sheet locations here
  sourceFile = Server.MapPath("tfn_test.xml")
  styleFile = Server.MapPath("tfn-summer.xsl")

  '// Load the XML
  set source = Server.CreateObject("Microsoft.XMLDOM")
  source.async = false
  source.load(sourceFile)
  '// Load the XSL
  set style = Server.CreateObject("Microsoft.XMLDOM")
  style.async = false
  style.load(styleFile)

 htmltext = source.transformNode(style)
 Response.Write htmltext






More information about the thelist mailing list