code: static Transform getTransform(Element element, String attribute) {
  		String str = element.getAttribute(attribute);
  		if (str == null) {
  			return new Transform();
  		}
  		
  		if (str.equals("")) {
  			return new Transform();
  		} else if (str.startsWith("translate")) {
  			str = str.substring(0, str.length()-1);
  			str = str.substring("translate(".length());
  			StringTokenizer tokens = new StringTokenizer(str, ", ");
  			float x = Float.parseFloat(tokens.nextToken());
  			float y = Float.parseFloat(tokens.nextToken());
  			
  			return Transform.createTranslateTransform(x,y);
  		} else if (str.startsWith("matrix")) {
  			float[] pose = new float[6];
  			str = str.substring(0, str.length()-1);
  			str = str.substring("matrix(".length());
  			StringTokenizer tokens = new StringTokenizer(str, ", ");
  			float[] tr = new float[6];
  			for (int j=0;j<tr.length;j++) {
  				tr[j] = Float.parseFloat(tokens.nextToken());
  			}
  			
  			pose[0] = tr[0];
  			pose[1] = tr[2];
  			pose[2] = tr[4];
  			pose[3] = tr[1];
  			pose[4] = tr[3];
  			pose[5] = tr[5];
  			
  			return new Transform(pose);
  		}
  		
  		return new Transform();
  	}
docs: Get a transform defined in the XML
  
  @param element The element from which the transform should be read
  @param attribute The name of the attribute holding the transform
  @return The transform to be applied