hi,
am stuck with doing this task - i am trying to write to disk an xml file that looks like
so far i have tried
but kept getting 'permission denied error' - tried all security permission settings on IUSR_pcname account
but couldnt get it get past that error, besides this code
had to run on a 3rd party host that i cant change the permissions.
so next i tried
am stuck with doing this task - i am trying to write to disk an xml file that looks like
Code:
<newsTicker>
<item>
<header>News item 1</header>
<link newWindow="_blank"></link>
</item>
<item>
<header>News item 2</header>
<link newWindow="_blank"></link>
</item>
</newsTicker>
so far i have tried
Code:
jobssql = "SELECT jobtitle, jobid "
jobssql = jobssql & "FROM jobs"
Set rsjobs = Server.CreateObject("ADODB.Recordset")
rsjobs.Open jobssql, sconn
Dim xml_string
'Create FSO Objects
dim objFso, xmlFile
set objFso = server.createobject("Scripting.FileSystemObject")
'create the xml file
set xmlFile = objFso.CreateTextFile("jobsxml.xml")
'start writing our xml to the file we just created.
xmlFile.Write("<xml version='1.0' ?>")
xmlFile.Write "<newsTicker>"
do while not rsjobs.eof
x_jobtitle = rsjobs("jobtitle")
'pretend invoice_id passed as txtInvoiceId
xmlFile.Write "<item><header>" & (x_jobtitle) & "</header><link newWindow=_blank></link></item>"
rsjobs.movenext
loop
rsjobs.close
xmlFile.Write "</newsTicker>"
'close file
xmlFile.Close()
'destroy FSO objects
Set objFso = Nothing
but kept getting 'permission denied error' - tried all security permission settings on IUSR_pcname account
but couldnt get it get past that error, besides this code
had to run on a 3rd party host that i cant change the permissions.
so next i tried
Code:
Set rstXML = Server.CreateObject("ADODB.Recordset")
Set rstXML = cnnXML.Execute("SELECT jobid, jobtitle FROM jobs ORDER BY jobid")
' Save the file to XML format.
rstXML.Save Server.MapPath("jobsxml.xml"), adPersistXML
[code]
but with this method you are stuck with the adPersistXML format - i think i need to use an xslt template file
any ideas welcome