Click to See Complete Forum and Search --> : ASP, XML and the Filesystem Object


drdexter33
03-27-2004, 09:43 PM
I 'm trying to open an xml file for appending from an ASP page.

The script I'm writing will add form records to an XML file.

I keep getting the following error:
---------------------------------------------------------------
Error Type:
Microsoft VBScript runtime (0x800A0005)
Invalid procedure call or argument
/dougDexter/index.asp, line 105
---------------------------------------------------------------
Line 105 is the third code line below.

dim objFSO, objFile, xmlString
set objFSO = server.CreateObject("scripting.filesystemobject")set objFile = objFSO.OpenTextFile(strFileName,ForAppending)


Thanks!

Doug

buntine
03-27-2004, 11:28 PM
ASP has its own XML-capable tools and methods. The FSO was not designed to read and write to well-formed XML documents.

ASP has a special object -- XMLDOM.

I have found a few tutorials you may be interested in:

- http://www.15seconds.com/issue/990527.htm
- http://tutorials.programmingsite.co.uk/aspdisplayxml.php
- http://www.hotscripts.com/Detailed/14955.html

Regards,
Andrew Buntine.