Automation of XML to HTML with ASP

Results 1 to 2 of 2

Thread: Automation of XML to HTML with ASP

  1. #1 Guest

    Default Automation of XML to HTML with ASP

    I have an ASP script that makes my XML wonderfully. I have a simple XSL document to format the XML to HTML. I can use XT in my command line to transform the stuff exactly as I want it, and create my resulting HTML file(s). How can I automate the call to XT (or whatever) using ASP / CGI or whatever so that with a click of submit button, all the juju happens? Do I need to make a batch file (yikes!) and use Server.Execute? Anybody help is greatly appreciated. - sk

  2. #2
    Join Date
    Dec 1969

    Default RE: Automation of XML to HTML with ASP

    &nbsp;<BR>&#039; set-up XMLHTTP<BR><BR>set objHTTP = Server.CreateObject("Microsoft.XMLHTTP")<BR><BR>&# 039; get the requested XML data from the remote location<BR>&#039; change the URL as per your feed.<BR><BR>On Error Resume Next<BR> "GET", xmlUrl, false<BR>objHTTP.send<BR>If err.number &#062; 0 Then <BR> Response.Write "Error: The xml file cannot be located"<BR> Response.Write "<BR>"<BR> Response.Write "Try again later"<BR>End If<BR><BR><BR>&#039; save the XML in objXML as XML<BR>set objXML = objHTTP.responseXML<BR><BR><BR>&#039; set-up XMLDOM<BR>set objXSL=Server.CreateObject("microsoft.xmldom")<BR> objXSL.async=false<BR><BR>&#039; load the XSL style sheet into the objXSL object<BR>&#039; change file name to match your XSL file<BR>objXSL.load(xslUrl)<BR><BR>Response.Write( objXML.transformnode(objXSL))<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts