Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Grabbing XML and saving it with FSO ?

Status
Not open for further replies.

777axa

Technical User
Jul 30, 2002
48
US
I'm using ASP but trying to display data from an XML stream produced by PHP file.
If I'm using my PC for displaying data it works fine.
If I upload files with javaScript or data Island to a remote server they stop working. XMP output is valid and well formed (I check it).
The only way to display the data on the remote server is to save a stream as an actual XML file and put it in the same directory on the server with Data Island file or JavaScript file - then it works.

I need to grab XML data and save it on the remote server as XML file 2 times a day.
1. Can I do it by using FSO in ASP?
Or this code is enough?

Dim oXML
Set oXML = CreateObject("MSXML2.DOMDocument")
oXML.load " & _
"day=" & Day(Now) & _
"&month=" & Month(Now) & _
"&year=" & Year(Now)
oXML.save "C:\calendar.xml"

2. Why doesn't want to work on a remote server but works on my machine when I connected to the Internet?

Thanks
 
FSO will save to hard drives, mapped drives (i think), and networked drives (sometimes). What you are looking at doing sounds more like your trying to FTP the file to a remote server. Your code above is enough to save the XML file to whatever machine the script is on, but if you have a remote host you probably will not have write or read access to their C drive.

The problem with your PHP file could be many things, you may want to ask about that in the PHP forum. It could be code related, it could be that your host is using a version that doesn't support soemthing your doing, etc.

-Tarwn Experts are only people who have realized how much they will never know about a language.
________________________________________________________________________________
Want to get great answers to your Tek-Tips questions? Have a look at faq333-2924
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top