private static User getUserById(Integer id){
        Element rootElement = dom.getDocumentElement();
        NodeList nodeList = rootElement.getElementsByTagName("user");
        if(nodeList != null && nodeList.getLength()>0) {
            for(int i=0; i<nodeList.getLength();i++){
                Element element = (Element)nodeList.item(i);
                if (element.getElementsByTagName("id").getLength()!=0 && id.equals(getLongValue(element, "id")))
                    return getUserFromElement(element);
            }
        }
        return null;
    }