Open a file and edit it automatically through anextension

Ask a Question related to Macromedia Exchange Dreamweaver Extensions, Design and Development.

  1. #1

    Default Open a file and edit it automatically through anextension

    Hey everyone!

    I have a questions on what functions to use to do the following. I have a XML
    file that is copied to the users configuration folder, I want to take the XML
    file and edit the second to last line of code and then save it and close it.
    Which functions should I use?

    Any help would be great! Thank you!

    Jammer Guest

  2. Similar Questions and Discussions

    1. open PDF automatically after downloading--possible?
      Is it possible to have pdfs open automatically upon download? Seems to me this used to happen but not any more. I hate having to hunt for the pdf i...
    2. Automatically insert last person/time to edit page
      We're encouraging our users to (at present manually) update the footer of the page with their email address and the date they last updated a page. ...
    3. Open file, make changes, save file, close, re-open, file contents not changed
      I've now run into this several times and it's completely destroyed all of my confidence in Ilustrator CS on Mac. I'm hoping someone can confirm that...
    4. Excel open automatically without giving a dialog box option to Open/Save/Cancel using filesys.create
      Excel open automatically without giving a dialog box option to Open/Save/Cancel using filesys.createTextFile. How to pop up the dialog box option...
    5. XP home Automatically tries to open zip files rather than download them!
      XP home's Windows Explorer suddenly automatically tries to open zip files rather than download them! Normally, this would not be a problem. I...
  3. #2

    Default Re: Open a file and edit it automatically through anextension

    Any thoughts?
    Jammer Guest

  4. #3

    Default Re: Open a file and edit it automatically through anextension

    Oh, and one more thing...
    I would like to do that all without the user seeing the document getting
    opened. Kind of like when you find and replace throughout a site and it asks if
    you can do it becuase you will not be able to undo it.

    Is that possible?

    Jammer Guest

  5. #4

    Default Re: Open a file and edit it automatically through an extension

    > I have a questions on what functions to use to do the following. I have a XML
    > file that is copied to the users configuration folder, I want to take the XML
    > file and edit the second to last line of code and then save it and close it.
    > Which functions should I use?
    A few suggestions :

    dw.getConfigurationPath
    DWfile.exists()
    DWfile.read()
    DWfile.write()
    dw.saveDocument()

    To find what you need in the file, I don't know
    dw.getDocumentDOM()
    dom.getElementsByTagName() or something else ?

    All this can be done without opening the document.



    Phil Guest

  6. #5

    Default Re: Open a file and edit it automatically through anextension

    Ahhhhhhh... those were the ones I was looking for. Awesome! Thanks!

    I really appreciate it!
    Jammer Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139