Guest FirefoxRocks Posted January 23, 2008 Share Posted January 23, 2008 I was wondering if I could develop a program using JavaScript that can edit an XML file. This is because there is no server, only a browser which is used to display the XML file.The data needs to be stored in the XML file permanently, not just in memory. This may be an issue with browser security, but I hope it is possible.If there is a way to do this, it would be really helpful. Thanks. Link to comment Share on other sites More sharing options...
Ingolme Posted January 24, 2008 Share Posted January 24, 2008 It can't be done, it's insecure. Only server-side languages can edit files.If javascript could do it I could hack any site with ease. Link to comment Share on other sites More sharing options...
jesh Posted January 31, 2008 Share Posted January 31, 2008 If you are developing this for yourself, of if you are building this for an intranet where all the users have IE, you can use ActiveX's FileSystemObject to edit your XML files.On the other hand, if you want the world to be able to use this (or you want to use a better browser than IE), you'll have to do all the IO on a web server. Link to comment Share on other sites More sharing options...
Synook Posted February 1, 2008 Share Posted February 1, 2008 AJAX is useful for things like this. Link to comment Share on other sites More sharing options...
Guest FirefoxRocks Posted February 2, 2008 Share Posted February 2, 2008 Well the organization doesn't have a web server. Any way I can edit the files on the local computer without opening the XML file in Notepad? Link to comment Share on other sites More sharing options...
boen_robot Posted February 2, 2008 Share Posted February 2, 2008 Well the organization doesn't have a web server. Any way I can edit the files on the local computer without opening the XML file in Notepad?Open it in any other text or GUI editor .That, or create an ActiveX control that would do it (essentially - create a new Windows XML editor).BTW, Infopath can create forms based on a schema or an inputted XML file. If you don't have a schema, and don't want to create one, and the XML file can't descibe all possibilities, you could create a blank form, and forge the XML model from there. Just be sure to keep the form field names the same as the names of the XML element you want to generate. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.