code: private Diagram loadDiagram(InputStream in, boolean offset)
  			throws SlickException {
  		try {
  			DocumentBuilderFactory factory = DocumentBuilderFactory
  					.newInstance();
  			factory.setValidating(false);
  			factory.setNamespaceAware(true);
  
  			DocumentBuilder builder = factory.newDocumentBuilder();
  			builder.setEntityResolver(new EntityResolver() {
  				public InputSource resolveEntity(String publicId,
  						String systemId) throws SAXException, IOException {
  					return new InputSource(
  							new ByteArrayInputStream(new byte[0]));
  				}
  			});
  
  			Document doc = builder.parse(in);
  			Element root = doc.getDocumentElement();
  
  			String widthString = root.getAttribute("width");
  			while (Character.isLetter(widthString
  					.charAt(widthString.length() - 1))) {
  				widthString = widthString.substring(0, widthString.length() - 1);
  			}
  
  			String heightString = root.getAttribute("height");
  			while (Character.isLetter(heightString
  					.charAt(heightString.length() - 1))) {
  				heightString = heightString.substring(0,heightString.length() - 1);
  			}
  
  			float docWidth = Float.parseFloat(widthString);
  			float docHeight = Float.parseFloat(heightString);
  
  			diagram = new Diagram(docWidth, docHeight);
  			if (!offset) {
  				docHeight = 0;
  			}
  			loadChildren(root, Transform
  					.createTranslateTransform(0, -docHeight));
  
  			return diagram;
  		} catch (Exception e) {
  			throw new SlickException("Failed to load inkscape document", e);
  		}
  	}
docs: Load a SVG document into a diagram
  
  @param in
  The input stream from which to read the SVG
  @param offset
  Offset the diagram for the height of the document
  @return The diagram loaded
  @throws SlickException
  Indicates a failure to process the document