Hi,
I need to retrieve multiple files (about 408 to be exact) and wanted to automate the process.
I've used something like this to retrieve pages before:
`wget -Oxml1.xml 'http://webservices.amazon.com/onca/xml?Service=AWSECommerceService&ItemPage=1' `;
`wget -Oxml2.xml 'http://webservices.amazon.com/onca/xml?Service=AWSECommerceService&ItemPage=2' `;
`wget -Oxml3.xml 'http://webservices.amazon.com/onca/xml?Service=AWSECommerceService&ItemPage=3' `;
But I need to go up to
`wget -Oxml408.xml 'http://webservices.amazon.com/onca/xml?Service=AWSECommerceService&ItemPage=408' `;
Since I'm basically a perl virgin, I wasn't sure how to code this, although I believe it should be relatively simple.
The urls above are just examples, the data I want isn't actually there.
Once I get all of these files, I'd like to combine them into one XML file. The first and last files will be different, but I can manually adjust those. So, basically all I'd need to do for docs xml2.xml through xml407.xml is strip everything before the first instance of <Item> and at the bottom </Items></ItemSearchResponse> needs to be stripped off.
So each file would now consist of something like:
<Item>data here</Item>
<Item>data here</Item>
<Item>data here</Item>
Then xml2.xml through xml407.xml needs to be combined to merge all of these items.
I'd gladly paypal $20 to whomever can help me with a solution that works.
Thanks!
Robert
http://www.pcprofiles.com
PC Profiles and hardware reviews
I need to retrieve multiple files (about 408 to be exact) and wanted to automate the process.
I've used something like this to retrieve pages before:
`wget -Oxml1.xml 'http://webservices.amazon.com/onca/xml?Service=AWSECommerceService&ItemPage=1' `;
`wget -Oxml2.xml 'http://webservices.amazon.com/onca/xml?Service=AWSECommerceService&ItemPage=2' `;
`wget -Oxml3.xml 'http://webservices.amazon.com/onca/xml?Service=AWSECommerceService&ItemPage=3' `;
But I need to go up to
`wget -Oxml408.xml 'http://webservices.amazon.com/onca/xml?Service=AWSECommerceService&ItemPage=408' `;
Since I'm basically a perl virgin, I wasn't sure how to code this, although I believe it should be relatively simple.
The urls above are just examples, the data I want isn't actually there.
Once I get all of these files, I'd like to combine them into one XML file. The first and last files will be different, but I can manually adjust those. So, basically all I'd need to do for docs xml2.xml through xml407.xml is strip everything before the first instance of <Item> and at the bottom </Items></ItemSearchResponse> needs to be stripped off.
So each file would now consist of something like:
<Item>data here</Item>
<Item>data here</Item>
<Item>data here</Item>
Then xml2.xml through xml407.xml needs to be combined to merge all of these items.
I'd gladly paypal $20 to whomever can help me with a solution that works.
Thanks!
Robert
http://www.pcprofiles.com
PC Profiles and hardware reviews