Shiva_Kumar
asked on
php script to compare yesterdays and todays node value of same xml file
hi,
I have a XML file whose one of the node value changes every day once. Now i need to script which can compare yesterdays and todays node value of the same xml file. if they found to be same then i would assume that it is not updated.
here's what i am doing:
1. parsing the xml file to get todays node value.
2. i am keeping a downloaded copy of the same xml file from yesterday and parsing this xml file to compare todays and yesterdays node value.
Is there any better way performing this task.
Thanks
I have a XML file whose one of the node value changes every day once. Now i need to script which can compare yesterdays and todays node value of the same xml file. if they found to be same then i would assume that it is not updated.
here's what i am doing:
1. parsing the xml file to get todays node value.
2. i am keeping a downloaded copy of the same xml file from yesterday and parsing this xml file to compare todays and yesterdays node value.
Is there any better way performing this task.
Thanks
ASKER
the xml file is very small.. this is how it looks
<Pkg xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<pkgId>abcdefgh=</pkgId>
<pkgValue>xyz-abc=</pkgValue>
</Pkg>
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
If you need a sample script can I get a copy of the XML file labeled with what data you want to compare from them? I just need it for reference on which arrays to call.