Problem specifying file location for FileSystemObject and XML DOM parser...

Discussion in 'Javascript' started by ezmiller, Dec 29, 2005.

  1. ezmiller

    ezmiller Guest

    Hi,
    A bit of a mysterious problem. I am trying to load an xml file into a
    page on the client using Microsoft's XML DOM parser and then write to
    that same file using the FileSystemObject.

    But when I do this the two objects seem to require different types of
    inputs specifying the file and file path.

    For instance, say my file is in a sub directory "data" of the
    directory containing the html files containing the script. I can load
    the xml file by feeding the following string "data/users.xml". But if
    I were to give the same input to the FileSystemObject OpenTextFile
    method it would be unable ot find the file. The reason seems to be
    that the FileSystemObject's default directory is the Desktop.

    What do I provide as input to these two different objects that will
    specify the file? I want to be able to provide a relative path because
    this thing I am writing will not always be on the same computer and I
    cannot rely on a stable directory structure.
     
    ezmiller, Dec 29, 2005
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Tobi Krausl
    Replies:
    0
    Views:
    364
    Tobi Krausl
    Nov 18, 2003
  2. arne
    Replies:
    0
    Views:
    355
  3. Erik Wasser
    Replies:
    5
    Views:
    465
    Peter J. Holzer
    Mar 5, 2006
  4. Sean
    Replies:
    3
    Views:
    279
    robic0
    Oct 3, 2006
  5. Sean
    Replies:
    0
    Views:
    370
Loading...

Share This Page