jasonsalas
IS-IT--Management
Hi all,
I'm looking to use the following script block as a string in a subroutine:
<!-- XML content starts here -->
<%
Dim strFileName
strFileName = Request.QueryString("filename"
' Load the XML document
Set source = Server.CreateObject("Microsoft.XMLDOM"
source.async = false
source.load(Server.MapPath("" & strFileName & ".xml")
' Load the XSL stylesheet
Set style = Server.CreateObject("Microsoft.XMLDOM"
style.async = false
style.load(Server.MapPath("news-article.xsl")
' Write out the page contents
Response.Write(source.transformNode(style))
%>
<!-- XML content ends here -->
<!--#include file="footer.asp"-->
*******************************
What I'd like to do is be able to insert that exact script so that it will be executed in the following SUB:
<%
Sub CreateNewASP
Dim FSO, strFileName
strFileName = Request.QueryString("FILENAME"
Set FSO = CreateObject(Scripting.FileSystemObject)
Set newStory = FSO.CreateTextFile("c:\inetpub\ & strFileName & ".asp", False)
newStory.Write("SHOULD_GO_IN_HERE_AS_A_SCRIPT"
newStory.Close
End Sub
%>
*************************************
Got any ideas...or better way to do this? I'm trying to develop an automated method for writing files on my server using ASP/XML/XSL.
I'm looking to use the following script block as a string in a subroutine:
<!-- XML content starts here -->
<%
Dim strFileName
strFileName = Request.QueryString("filename"
' Load the XML document
Set source = Server.CreateObject("Microsoft.XMLDOM"
source.async = false
source.load(Server.MapPath("" & strFileName & ".xml")
' Load the XSL stylesheet
Set style = Server.CreateObject("Microsoft.XMLDOM"
style.async = false
style.load(Server.MapPath("news-article.xsl")
' Write out the page contents
Response.Write(source.transformNode(style))
%>
<!-- XML content ends here -->
<!--#include file="footer.asp"-->
*******************************
What I'd like to do is be able to insert that exact script so that it will be executed in the following SUB:
<%
Sub CreateNewASP
Dim FSO, strFileName
strFileName = Request.QueryString("FILENAME"
Set FSO = CreateObject(Scripting.FileSystemObject)
Set newStory = FSO.CreateTextFile("c:\inetpub\ & strFileName & ".asp", False)
newStory.Write("SHOULD_GO_IN_HERE_AS_A_SCRIPT"
newStory.Close
End Sub
%>
*************************************
Got any ideas...or better way to do this? I'm trying to develop an automated method for writing files on my server using ASP/XML/XSL.