class Wallet {

    public void load() throws IOException, SAXException, ParserConfigurationException {

    	/**

         <wallet high="8933">
             <row id=1>
                 <address nonce="1" >7c63d6d8b6a4c1ec67766ae123637ca93c199935<address/>
                 <privkey>roman<privkey/>
                 <value>20000000<value/>
             </row>
             <row id=2>
                 <address nonce="6" >b5da3e0ba57da04f94793d1c334e476e7ce7b873<address/>
                 <privkey>cow<privkey/>
                 <value>900099909<value/>
             </row>
         </wallet>
         
         */

        String dir = System.getProperty("user.dir");
        String fileName = dir + "/wallet.xml";

        DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();
        DocumentBuilder dBuilder = dbFactory.newDocumentBuilder();
        Document doc = dBuilder.parse(fileName);

        Node walletNode = doc.getElementsByTagName("wallet").item(0);
        String high = walletNode.getAttributes().getNamedItem("high").getTextContent();
        this.setHigh(Long.parseLong(high));

        NodeList rowNodes = walletNode.getChildNodes();

        for (int i = 0; i <  rowNodes.getLength(); ++i ) {

            Node rowNode   = rowNodes.item(i);
            Node addrNode  = rowNode.getChildNodes().item(0);
            Node privNode  = rowNode.getChildNodes().item(1);
            Node valueNode = rowNode.getChildNodes().item(2);

            // TODO: complete load func
//            byte[] privKey = Hex.decode(privNode.getTextContent());
//            Address address = new Address(privKey);
//            BigInteger value = new BigInteger(valueNode.getTextContent());

//            this.importKey(privKey);
//            this.setBalance(address, value);
        }
    }

}