public static Vector xmlRead(String fileName) 
    {
      SAXBuilder builder = new SAXBuilder();
      Vector pointsList = new Vector();
      try
        {
            Document doc = builder.build( fileName );	// parse XML tags
            Element root = doc.getRootElement();	// get root of XML tree
            
            List <Element>children = root.getChildren();
            
            
            Iterator iterator = children.iterator();
            List <Element> subChildren = null;
            List <Element> points = null;
            String value = null;
            float x1, y1, x2, y2;
            int a;
                   
            for(int i=0; i<children.size(); i++)
            {
                if (children.get(i).getName().equals("shape"))
                    subChildren = children.get(i).getChildren();
            }
            
            Vector xymin = new Vector();
            Vector xymax = new Vector();

            // loop across subchildren of shape level
            for(int i=0; i<subChildren.size(); i++)
            {
                if (subChildren.get(i).getName().equals("polyline"))
                {
                    points = subChildren.get(i).getChildren();
                   
                    Vector point = new Vector();
                             
                    for(int j=0; j<points.size(); j++)
                    {
                        value = points.get(j).getValue();
                        a = value.indexOf(" ", 1);

                        point.add(Double.parseDouble(value.substring(0, a)));
                        point.add(Double.parseDouble(value.substring(a, value.length())));
                    }
                     
                    pointsList.add(point);                 
                }
                else if (subChildren.get(i).getName().equals("xymin"))
                {
                    Element point = subChildren.get(i);//.getChildren();
                    value = point.getValue();
                    a = value.indexOf(" ", 1);
                        
                    xymin.add(Double.parseDouble(value.substring(0, a)));
                    xymin.add(Double.parseDouble(value.substring(a, value.length())));
                }
                else if (subChildren.get(i).getName().equals("xymax"))
                {
                    Vector xyrange = new Vector();
                    Element point = subChildren.get(i);//.getChildren();
                    value = point.getValue();
                    a = value.indexOf(" ", 1);
                        
                    xymax.add(Double.parseDouble(value.substring(0, a)));
                    xymax.add(Double.parseDouble(value.substring(a, value.length())));
                    
                    xyrange.add((double)xymax.get(0)-(double)xymin.get(0));
                    xyrange.add((double)xymax.get(1)-(double)xymin.get(1));

                    pointsList.add(xyrange); 
                    
                }
              
            }
            
            
        }
        // JDOMException indicates a well-formedness error
        catch ( JDOMException e )
        {
            System.out.println( "walkway.xml" + " is not well-formed." );
            System.out.println( e.getMessage() );
        }
        catch ( IOException e )
        {
            System.out.println( e );
        }
      return pointsList;
        //
    }