code: public static ConfigurableEmitter loadEmitter(InputStream ref,
  			ConfigurableEmitterFactory factory) throws IOException {
  		if (factory == null) {
  			factory = new ConfigurableEmitterFactory() {
  				public ConfigurableEmitter createEmitter(String name) {
  					return new ConfigurableEmitter(name);
  				}
  			};
  		}
  		try {
  			DocumentBuilder builder = DocumentBuilderFactory.newInstance()
  					.newDocumentBuilder();
  			Document document = builder.parse(ref);
  
  			if (!document.getDocumentElement().getNodeName().equals("emitter")) {
  				throw new IOException("Not a particle emitter file");
  			}
  
  			ConfigurableEmitter emitter = factory.createEmitter("new");
  			elementToEmitter(document.getDocumentElement(), emitter);
  
  			return emitter;
  		} catch (IOException e) {
  			Log.error(e);
  			throw e;
  		} catch (Exception e) {
  			Log.error(e);
  			throw new IOException("Unable to load emitter");
  		}
  	}
docs: Load a single emitter from an XML file
  
  @param ref
  The stream to read the XML from
  @param factory
  The factory used to create the emitter than will be poulated
  with loaded data.
  @return The configured emitter
  @throws IOException
  Indicates a failure to find, read or parse the XML file