private List<Bean> findBeans(Document doc) {
        List<Bean> beans = Lists.newArrayList();
        Element beansEle = doc.getDocumentElement();
        NodeList childNodes = beansEle.getChildNodes();

        for (int i = 0; i < childNodes.getLength(); i++){
            Node item = childNodes.item(i);
            if (isANodeWithName(item, "bean")){
                String className = getAttributesTextByName(item, "class");
                String id = getAttributesTextByName(item, "id");
                Bean newBean = new Bean(className, id);

                newBean.setArguments(getSpecificNodes(item.getChildNodes(), new Predicate<Node>() {
                    @Override
                    public boolean apply(@Nullable Node node) {
                        return isANodeWithName(node.getParentNode(), "constructor-arg") && isANodeWithName(node, "ref");
                    }
                }));
                newBean.setProperties(findProperties(item.getChildNodes()));

                beans.add(newBean);
            }
        }
        return beans;
    }