public HashMap<String, Integer> getUserStocks(String uid) {
        HashMap<String, Integer> userStocks = new HashMap<String, Integer>();;
        NodeList userList = doc.getElementsByTagName("user");
        System.out.println(userList.getLength());

        Node user = getUserNode(uid);
        NodeList userNode = user.getChildNodes();
        System.out.println("stock size : " + userNode.getLength());

        for (int temp = 0; temp < userNode.getLength(); temp++) {
            Node stockNode = userNode.item(temp);

            if (stockNode.getNodeType() == Node.ELEMENT_NODE) {
                Element stockElement = (Element) stockNode;
                System.out.println(stockElement.getAttribute("identifier") + stockElement.getAttribute("quantity"));
                userStocks.put(stockElement.getAttribute("identifier"), Integer.parseInt(stockElement.getAttribute("quantity")));
            }
        }

        /* XML code to get the elements and add to Hashmap */
        return userStocks;
    }