@SuppressWarnings("unchecked")
	public Database analyDocument(Document document){
		Element root = document.getRootElement();
		if(null != root && XmlConstant.DATABASE.equals(root.getName())){
			Database database = new Database();
			Gson gson = new Gson();
			database = gson.fromJson(gson.toJson(getAttribute(root)), Database.class);
			List<Table> tables = new ArrayList<Table>();
			List<Element> elements = root.elements();
			for(Element element : elements){
				Table table = gson.fromJson(gson.toJson(getAttribute(element)), Table.class);
				List<Element> leafs = element.elements();
				List<Column> columns = new ArrayList<Column>();
				for(Element leaf : leafs)
					columns.add(gson.fromJson(gson.toJson(getAttribute(leaf)), Column.class));
				table.setColumns(columns);
				tables.add(table);
			}
			database.setTables(tables);
			return database;
		}
		return null;
	}