public void sendOrder(String where) {
		DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
		try {
			dbf.setFeature("http://apache.org/xml/features/validation/schema", true);
			dbf.setNamespaceAware(true);
			DocumentBuilder db = dbf.newDocumentBuilder();
			Document doc = db.newDocument();
			Element order = (Element) doc.createElement("order");
			doc.appendChild(order);
			order.setAttribute("id", Integer.toString(id));
			Element eIdCustomer = doc.createElement("idCustomer");
			eIdCustomer.setTextContent(Integer.toString(idCustomer));
			order.appendChild(eIdCustomer);
			Element eIdCompany = doc.createElement("idCompany");
			eIdCompany.setTextContent(Integer.toString(idCompany));
			order.appendChild(eIdCompany);
			Element eCurrency = doc.createElement("currency");
			eCurrency.setAttribute("type", currency.toString());
			order.appendChild(eCurrency);
			Element eCart = doc.createElement("cart");
			for (Map.Entry<Product, Integer> e: cart.entrySet()) {
				Element q = doc.createElement("quantity");
				q.setTextContent(Integer.toString(e.getValue()));
				Element p = doc.createElement("product");
				Element name = doc.createElement("name");
				Element up   = doc.createElement("unitPrice");
				name.setTextContent(e.getKey().getName());
				up  .setTextContent(Double.toString(e.getKey().getUnitPrice()));
				p.appendChild(name);
				p.appendChild(up);
				Element item = doc.createElement("item");
				item.appendChild(p);
				item.appendChild(q);
				eCart.appendChild(item);
			}
			order.appendChild(eCart);
			Transformer tFormer = TransformerFactory.newInstance().newTransformer();
			tFormer.setOutputProperty(OutputKeys.INDENT, "yes");
			DOMSource source = new DOMSource(doc);
			StreamResult result = new StreamResult(new File(where + "/order.xml"));
			tFormer.transform(source, result);			
		} catch (ParserConfigurationException e) {
			e.printStackTrace();
		} catch (TransformerConfigurationException e1) {
			e1.printStackTrace();
		} catch (TransformerFactoryConfigurationError e1) {
			e1.printStackTrace();
		} catch (TransformerException e1) {
			e1.printStackTrace();
		}
		
	}