public boolean addStock(Stock s) {
        if (s == null) {
            return false;
        }
        
        Element e = getStockByIdentifier(s.getIdentifier());
        if (e != null) {
            System.err.println("Stock " + s.getIdentifier() + " already exist!");
            return false;
        }
        Element newStock = doc.createElement("stock");
        newStock.setAttribute("identifier", s.getIdentifier());
        newStock.setAttribute("name", s.getName());
        newStock.setAttribute("inventory", "1000");
        newStock.setAttribute("price", String.valueOf(s.getPrice()));
        
        Element root = doc.getDocumentElement();
        root.appendChild((Node)newStock);
        save();
        return true;
    }