Updating an XML file via web interface? 
January 5th, 2009, 04:13 PM
| | Newbie | | Join Date: Oct 2008 Location: Metro-Detroit Area Age: 28
Posts: 10
| | Updating an XML file via web interface?
Hi,
I am developing a website for a client. On each web page, I have a created a "News Link" section. This section dynamically displays news articles from an XML document that I created using Adobe Spry. What I want to do is to have the client update their news articles. I'd like to write some sort of web interface where they could...
- View the articles
- Add and delete articles
- Make changes to existing articles
This would require updating the XML. Could I do this with PHP? Whats the best way of accomplishing this?
| 
January 5th, 2009, 07:41 PM
|  | Moderator | | Join Date: Aug 2008 Location: Leipzig, Germany Age: 32
Posts: 2,209
| |
I don't know what the best way is, but you can do it with PHP. to make changes to XML files you can load them into either the SimpleXML or the DOMDocument class. DOMDocument is more versatile and shouldn't make too many problems if you're familiar with DOM (e.g. from javascript) though pretty much depends (imho) on the HTML interface.
regards
somewhere on the net I've seen a RSS generator class.... maybe I find it again.
| 
January 5th, 2009, 08:05 PM
| | Newbie | | Join Date: Oct 2008 Location: Metro-Detroit Area Age: 28
Posts: 10
| |
Maybe an easier way is to just build a mySQL database rather than XML? Writing PHP to update that would be simple.
| 
January 5th, 2009, 08:30 PM
|  | Moderator | | Join Date: Aug 2008 Location: Leipzig, Germany Age: 32
Posts: 2,209
| |
why not, seems reasonable. it's only a matter of personal preference which way to go.
regards
| 
January 6th, 2009, 07:22 PM
| | Moderator | | Join Date: Mar 2006
Posts: 1,096
| |
I'm not sure why you're not just updating a database with the new xml (or fields), and then regenerating the whole xml. How do you create the xml from Adobe Spry in the first place?
|  | | Thread Tools | Search this Thread | | | | | | | What is Bytes?
We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights.
Get the best answers to your questions from over 220,840 network members.
|