XML : Parsing XML and Update expiresAt and signature arguments

I have a specific need in which I need to update pricing inventory from an affiliate feed. Let me describe the functionality I intend to achieve.

Affiliate Flipkart : Their realtime parent feed is https://affiliate-api.flipkart.net/affiliate/api/%3C7cb35a2123a14bc68fb81f960de846d9%3E.xml

On opening this xml, there is a list of categories as attributes with each one having a specific URL (For Eg: Bags Category has : https://affiliate-api.flipkart.net/affiliate/feeds/<7cb35a2123a14bc68fb81f960de846d9>/category/reh.xml?expiresAt=1454004225947&sig=5598e9c61c716911f2ca755704f47255)

Now the issue I am facing is this product feed mentioned has expiry and signature(highlighted) which gets updated after a certain duration. Is there a way I can extract this information from the Parent URL and feed the updated category URL in my target system. I can achieve to refresh the parent URL/feed by scheduling a cron on the but is there a way to extract the attributes from the from the xml which gets refreshed.

Any pointers would indeed be helpful.

Thanks Ashish

No comments:

Post a Comment