<PROJECT_ID>12345</PROJECT_ID>
<JOBID>101</JOBID>
<TYPE1>add</JOBID>
<FILE1>/tmp/file_data_gros</FILE1>
<JOBID>104</JOBID>
<TYPE2>delete</TYPE2>
<FILE2>/tmp/file_myvalues</FILE2>
I would need to parse this file like so:
found value for first JOBID and also found values for the associated FILE1 and TYPE1 and will now execute my program with these values:
`myprogram -action add -file /tmp/file_data_gros`
Then loop would then carry on to see if there was another JOBID and if there is, which there is in this example, then my program would execute:
`myprogram -action delete -file /tmp/file_myvalues
then loop would carry on to see if there was another JOBID and if there was if would find the value to the next TYPE* and FILE* fields defined and then execute my program again
I don't fully understand your code but how would I loop over this file to do the above and execute my program?
|