String version = beans.getAttribute("version"); if (version != null && version.length() != 0) { addPropertyElement(bean, "version", version); beans.removeAttribute("version"); }
    public void processElement(Element element, BeanDefinitionReader beanDefinitionReader) {        Document document = element.getOwnerDocument();        Element beans = document.createElement("beans");        document.removeChild(element);        document.appendChild(beans);        Element bean = addBeanElement(beans, Descriptor.class.getName());        DOMUtil.copyAttributes(element, beans);        DOMUtil.moveContent(element, bean);        // lets remove the default namespace just in case        beans.removeAttribute("xmlns");        String id = bean.getAttribute("id");        if (id == null || id.length() == 0) {            bean.setAttribute("id", "jbi");        }        bean.setAttribute("singleton", "true");                        moveToProperyListElement(bean, "path-element", "pathElements");        moveToProperyListElement(bean, "service-unit", "serviceUnits");                moveToProperyListElement(bean, "connection", "connections");                moveToProperyListElement(bean, "provides", "provides");                moveToProperyListElement(bean, "consumes", "consumes");                processChildren(compositeProcessor, bean, beanDefinitionReader);                logXmlGenerated(log, "Adding new beans", beans);    }