Is it possible to edit and XML file that is located on your website for instance? So that I don't need to upload that XML file over and over...
Printable View
Is it possible to edit and XML file that is located on your website for instance? So that I don't need to upload that XML file over and over...
Look at it more from the perspective of how you can save the file. When you open the file, it has been transferred to your computer already, and then you can do whatever you want with it, but if the path to the file is not located on a local drive, or a network share, then you'll have to save the file locally, and then transfer it back.
There are a number of easy methods to ftp a file using code.
Another way would be to have a page with a simple editor on that same site. But then you get into issues with permissions.
Matt
But if it is my own site?
Just because it is your own site does not mean that you don't have to ftp the file back. Is the server on your local network? If so, then you can just open the file, edit it and save it again, otherwise you will need to get the file from the webserver, edit it, save it and re-upload it to that server just like SharkC382 said.
Yes. Remote Desktop Connection. I updated two different websites on two different servers through RDP a couple days ago.Quote:
Originally Posted by Maglor
And another thing. To be able to get the values of those items in that XML file, do I need to save the XML file on my computer first? Because if so, then players (I'm making a game) could edit the XML file and get all those items cheaper... And That's not really what I want
On a web site, it would be easy to do what you want. I'm not sure about local applications...
I do something similar for my game, however, what I do is download the file into the application. So, what I do is setup a web page that gets the source of the xml and returns it. Then I use a web request to hit that page, and the response is the actual xml file. There is not really any opportunity for them to alter the file at this point. Then, when the game does whatever it does, I generate the file in the application, and have it upload it from there.