Hi.
I have an xml file that I need to scroll down to find information under the heading Exposure. the general format is as below. I need to pull out the "number of Images" number in a list for all the red and all the green exposures and count them.
<Exposure>
<Exposure Name=“red” NumberOfImages=“4” Read=“First”/>
<Exposure Name=“green” NumberOfImages=“4” Read=“First”/>
<Exposure Name=“red” NumberOfImages=“5” Read=“First”/>
<Exposure Name=“green” NumberOfImages=“4” Read=“First”/>
…..
<Exposure Name=“red” NumberOfImages=“6” Read=“Second”/>
<Exposure Name=“green” NumberOfImages=“7” Read=“Second”/>
<Exposure Name=“red” NumberOfImages=“8” Read=“Second”/>
<Exposure Name=“green” NumberOfImages=“9” Read=“Second”/>
so in the above, I need an two arrays, one for green and one for red such as (for red)
1 Red 4 First
1 Red 5 First
..
1 Red 6 Second
1 Red 8 Second
Im not to sure how to continue with my attempt:
fid=fopen(fileR);
while ~feof(fid)
l=fgetl(fid);
if strfind(l,'Exposures')
l2=fgetl(fid);
if strfind(l2,'Exposure Name="red')
...
end
end