public void toXML(){
		try {
			DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();
			DocumentBuilder docBuilder = docFactory.newDocumentBuilder();
			Document out = docBuilder.newDocument();
			
			Element rootElem = out.createElement("bill");
			out.appendChild(rootElem);
			
			for (Device dev : dept.getEquip()) {
				rootElem.appendChild(createNode(dev, dev.getName(), out));
			}
			
			TransformerFactory transformerFactory = TransformerFactory.newInstance();
			Transformer transformer = transformerFactory.newTransformer();
			DOMSource dom = new DOMSource(out);
			
			StreamResult result = new StreamResult(new File("out.xml"));
			transformer.transform(dom, result);
		} catch (ParserConfigurationException e) {
			e.printStackTrace();
		} catch (TransformerConfigurationException e){
			e.printStackTrace();
		} catch (TransformerException e){
			e.printStackTrace();
		}
	}