
xml_file='F:\kitchen_debug.xml'; % get from http://vision-app1.cs.uiuc.edu:8080/annotations/kitchen_debug.xml
x=xmltree(xml_file);
polygons=find(x,'results/annotation/polygon');
for iP=polygons
    polygon=get(x,iP);
    polygon_points=get(x,polygon.contents);
    fprintf('Polygon %s\n',polygon.attributes{1}.val);
    for iPoint=1:numel(polygon_points)
        pt_s=polygon_points{iPoint};
        pt=[];
        for iA=1:length(pt_s.attributes)
            eval(['pt.' pt_s.attributes{iA}.key '=' pt_s.attributes{iA}.val ';']);
        end            
        fprintf('\tpoint %d,%d, time %d\n',pt.x,pt.y,pt.ct);
    end
    
end