Best way to find updates in xml feed

Posted by misterjinx on Stack Overflow See other posts from Stack Overflow or by misterjinx
Published on 2010-03-25T13:19:11Z Indexed on 2010/03/25 13:23 UTC
Read the original article Hit count: 508

Filed under:
|
|

Hello all,

I have an xml feed that I have to check periodically for updates. The xml consists of many elements and I'm looking to figure it out which is the best (and probably faster) way to find out which elements suffered updates from last time I've checked.

What I think of is to check first the lastBuildDate for modifications and if it differs from the previous one to start parse the xml again. This would involve keeping each element with all of its attributes in my database. But each element can have different number of attributes as well as other nested elements. So if it would be to store each element in my database what would be the best way to keep them ?

That's why I'm asking for your help :) Thank you.

© Stack Overflow or respective owner

Related posts about Xml

Related posts about php