public static User getUserByXMLElem(XMLElement root) {
		String username = new String("Username Not Specified");
		String password = new String("Password Not Set");
		String url = new String("URL missing");
		int permission = IS_NORMAL;
		
		if (root.attributeMap.containsKey("permission")) {
			String permissionStr = root.attributeMap.get("permission");
			if (permissionStr.equals("admin"))
				permission = IS_ADMIN;
			else if (permissionStr.equals("temp"))
				permission = IS_TEMP;
		}
		for (int i = 0; i < root.childList.size(); i++) {
			XMLElement elem = root.childList.get(i);
			if (elem.name.equals("username")) {
				username = elem.content;
			} else if (elem.name.equals("password")) {
				password = new Encryption().generateHashedPassword(elem.content);
			} else if (elem.name.equals("homepageURL")) {
				url = elem.content;
			} else {
				System.out.println("Field not recognized in user : " + elem.name);
			}				
		}
		return new User(username, password, url, permission);
	}