ASP 101 - Active Server Pages 101 - Web01
The Place ASP Developers Go!

Please visit our partners


Windows Technology Windows Technology
15 Seconds
4GuysFromRolla.com
ASP 101
ASP Wire
VB Forums
VB Wire
WinDrivers.com
internet.commerce internet.commerce
Partners & Affiliates














ASP 101 is an
internet.com site
ASP 101 is an internet.com site
IT
Developer
Internet News
Small Business
Personal Technology

Search internet.com
Advertise
Corporate Info
Newsletters
Tech Jobs
E-mail Offers

ASP 101 News Flash ASP 101 News Flash





ASP Source Code:
<%
Dim objXML
Dim objXSL
Dim strHTML
' Load the XML File
' The "ServerHTTPRequest" line tells the XML processor that
' the file is to be retrieved from a remote server via HTTP.
' Please note that this code will not work for you until you
' replace our internal address (10.2.3.180) with www.asp101.com.
Set objXML = Server.CreateObject("MSXML2.DOMDocument")
objXML.async = False
objXML.setProperty "ServerHTTPRequest", True
objXML.load("http://10.2.3.180/samples/xmlxsl.xml")
' Load the XSL File
' In most cases I would think this would be local so I'm still
' pulling the stylesheet from the file system, but the code to
' retreive it via HTTP is simply commented out below:
Set objXSL = Server.CreateObject("MSXML2.DOMDocument")
objXSL.async = False
' Local (via file system)
objXSL.load(Server.MapPath("xmlxsl.xsl"))
' Remote (via HTTP)
'objXSL.setProperty "ServerHTTPRequest", True
'objXSL.load("http://10.2.3.180/samples/xmlxsl.xsl")
' Transform the XML file using the XSL stylesheet
strHTML = objXML.transformNode(objXSL)
Set objXML = Nothing
Set objXSL = Nothing
' Spit out the resulting HTML... the data comes from the
' .xml file, but the formatting of the results depends
' completely upon the .xsl file.
Response.Write strHTML
%>

Back the the Sample Output

Back to the Sample Index


Home |  News |  Samples |  Articles |  Lessons |  Resources |  Forum |  Links |  Search |  Feedback

Internet.com
The Network for Technology Professionals

Search:

About Internet.com

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | E-mail Offers