code: public static void saveConfiguredSystem(OutputStream out,
  			ParticleSystem system) throws IOException {
  		try {
  			DocumentBuilder builder = DocumentBuilderFactory.newInstance()
  					.newDocumentBuilder();
  			Document document = builder.newDocument();
  
  			Element root = document.createElement("system");
  			root
  					.setAttribute(
  							"additive",
  							""
  									+ (system.getBlendingMode() == ParticleSystem.BLEND_ADDITIVE));
  			root.setAttribute("points", "" + (system.usePoints()));
  
  			document.appendChild(root);
  			for (int i = 0; i < system.getEmitterCount(); i++) {
  				ParticleEmitter current = system.getEmitter(i);
  				if (current instanceof ConfigurableEmitter) {
  					Element element = emitterToElement(document,
  							(ConfigurableEmitter) current);
  					root.appendChild(element);
  				} else {
  					throw new RuntimeException(
  							"Only ConfigurableEmitter instances can be stored");
  				}
  			}
  
  			Result result = new StreamResult(new OutputStreamWriter(out,
  					"utf-8"));
  			DOMSource source = new DOMSource(document);
  
  			TransformerFactory factory = TransformerFactory.newInstance();
  			Transformer xformer = factory.newTransformer();
  			xformer.setOutputProperty(OutputKeys.INDENT, "yes");
  
  			xformer.transform(source, result);
  		} catch (Exception e) {
  			Log.error(e);
  			throw new IOException("Unable to save configured particle system");
  		}
  	}
docs: Save a particle system with only ConfigurableEmitters in to an XML file
  
  @param out
  The location to which we'll save
  @param system
  The system to store
  @throws IOException
  Indicates a failure to save or encode the system XML.