Jump to content

Best way to update an XML Feed


The14thGOD

Recommended Posts

Sorry, not sure where to post this question, this seemed like the best choice.

 

I have made a CMS for a client and they need to be able to publish/edit press releases. The issue comes when whatever they publish in the press releases category, it needs to also update an XML file which is a RSS feed. I was not involved in the making of the site (it's a few years old) and anyone who knows anything about it is gone. So I'm looking to find out what is the best way to update this file.

 

The 2 best options I have come up with are:

1. Anytime a new press release is made or a press release is edited, create a new XML file from the information in the database.

2. Add the new press release to the file when it is added. If a press release is edited, find out it's row number (stored by date) and use something like SimpleXML to replace the node/delete the node or something of that nature.

 

There seems to be only 1 or 2 press releases in a given month.

 

If anyone has any good links for the latter method can you please post them? I haven't found much on SimpleXML and manipulating of nodes. I addChild etc...

 

Sorry I am not fluent with XML..yet..

 

Thanks for any and all help,

Justin

Link to comment
https://forums.phpfreaks.com/topic/205460-best-way-to-update-an-xml-feed/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.