Programming Forums

Programming Forums (http://www.programmingforums.org/forumindex.php)
-   JavaScript and Client-Side Browser Scripting (http://www.programmingforums.org/forum23.html)
-   -   Inserting data into xml file (http://www.programmingforums.org/showthread.php?t=10846)

mikeandike22 Jul 26th, 2006 11:42 AM

Inserting data into xml file
 
Ok I know zero javascript, but I know PHP and basic programming concepts.

So I need to open a xml file as read and write.
insert some data from a form so bassicaly the form will have one field for keyword and from that form data I want to insert it into the xml file as
<item name="form info" />
Then I want to close the file as read only.

It would be a great help if someone could give me some links to things that could help or like some information. The reason I want to do it in javascript is because I want it to be crossplatform because not everyone who needs this script could have PHP on it.

Darkhack Jul 26th, 2006 12:33 PM

Javascript is client side and does not have any read/write permissions to the users hard drive. PHP is server side but does have read/write permissions to servers hard drive. PHP is the only way you are going to be able to do this. In paticular I would recommend PHP5 since version 4 is a lot more limited in its ability to handle XML files. If for some reason you can't use PHP at all then another server side language like Python or Ruby would work.

mikeandike22 Jul 26th, 2006 2:10 PM

yea I found a place that told me how to do it in PHP the thing that I just couldnt figure out in PHP was how to set the attribute and I saw a way to do it in javascript so i thought someone would know. thanks anyway.


All times are GMT -5. The time now is 12:51 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC