I have a file locations.xml which contains image filenames, and positions of rectangles drawn on the corresponding image. The XML node structure is as follows:
<?xml version="1.0" encoding="ISO-8859-1"?>
<tagset>
  <image>
    <imageName>ryoungt_05.08.2002/aPICT0034.JPG</imageName>
    <resolution x="960" y="1280" />
    <taggedRectangles>
      <taggedRectangle x="196.0" y="901.0" width="111.0" height="67.0" offset="0.0" rotation="0.0" userName="admin" />
      <taggedRectangle x="116.0" y="896.0" width="59.0" height="69.0" offset="0.0" rotation="0.0" userName="admin" />
      <taggedRectangle x="442.0" y="794.0" width="424.0" height="67.0" offset="0.0" rotation="0.0" userName="admin" />
      <taggedRectangle x="212.0" y="793.0" width="200.0" height="66.0" offset="0.0" rotation="0.0" userName="admin" />
      <taggedRectangle x="99.0" y="560.0" width="302.0" height="76.0" offset="0.0" rotation="0.0" userName="admin" />
      <taggedRectangle x="107.0" y="791.0" width="84.0" height="66.0" offset="0.0" rotation="0.0" userName="admin" />
      <taggedRectangle x="512.0" y="682.0" width="366.0" height="74.0" offset="0.0" rotation="0.0" userName="admin" />
      <taggedRectangle x="104.0" y="678.0" width="376.0" height="73.0" offset="0.0" rotation="0.0" userName="admin" />
    </taggedRectangles>
  </image>
I need to open this file in OpenCV and read it such that for every image filename in the XML file, the corresponding image will be opened in a window, and the rectangles will be drawn on the corresponding image.
Basically I need to open these files and see the rectangles to match them with rectangles drawn on the same images using a text detection algorithm. But it's handling the XML files that have me stumped. Any help is appreciated.
 
     
     
     
     
    