for(int i = 0; i < child.children().getLength(); i++)
{
childi = child.children().get(i);
if(Integer.parseInt(childi.attribute("i").v) < mini)
mini = Integer.parseInt(childi.attribute("i").v);
if(Integer.parseInt(childi.attribute("i").v) > maxi)
maxi = Integer.parseInt(childi.attribute("i").v);
if(Integer.parseInt(childi.attribute("j").v) < minj)
minj = Integer.parseInt(childi.attribute("j").v);
if(Integer.parseInt(childi.attribute("j").v) > maxj)
maxj = Integer.parseInt(childi.attribute("j").v);