I am trying to make an online XML editor that will give all the attributes and nodes in a form. My XML file: <xml> <photos> <photo url="images/image1" desc="best image ever" cat="1" /> <photo url="images/image2" desc="my photo" cat="2" /> <photo url="images/image3" desc="me and my friends" cat="3" /> </photos> </xml> PHP: I need an input box for each <photo> with all attributes as the value. and after submit button is pressed it will update the XML. Example : <form name="input" action="update.php" method="get"> <input type="text" name="url" value="images/image1" /> <input type="text" name="desc" value="best image ever" /> <input type="text" name="cat" value="1" /> <input type="submit" value="Update XML" /> </form> PHP: Thanks in advance.
It's probably a little too late to help you, but Im sure future readers could get some help here. Basically you will need to post your form to a server side scripting language, i.e. PHP. Then this will use the PHP $_POST['attribute_name']; format to pull in the urls that were posted through the form. Yuo can then start building an XML document within PHP, under the usage of the XML DOM methods, then print or save the string into a .xml document. A lot of information can be found online, on sites like PHP.net Uploading the file is another matter, maybe use a jQuery app to upload it into your web server???