DocumentFragment fragment = element.getOwnerDocument().createDocumentFragment();
DocumentFragment fragment = null;
    public void processElement(Element element, BeanDefinitionReader beanDefinitionReader) {        // lets rename any shared-library elements        Element property = addPropertyElement(element, "sharedLibraries");        Element list = addElement(property, "list");        DocumentFragment fragment = element.getOwnerDocument().createDocumentFragment();        Node current = element.getFirstChild();        while (current != null) {            Node node = current;            current = current.getNextSibling();            if (node.getNodeType() == Node.ELEMENT_NODE) {                String uri = node.getNamespaceURI();                if (!JbiNamespaceProcessor.JBI_NAMESPACE.equals(uri) && node != property) {                    element.removeChild(node);                    fragment.appendChild(node);                }                else if ("shared-library".equals(node.getNodeName())) {                    Element child = (Element) node;                    element.removeChild(child);                    list.appendChild(child);                    jbiProcessor.getSharedListProcessor().processElement(child, beanDefinitionReader);                }            }        }        Element descriptorProperty = addPropertyElement(element, "descriptorExtension");        descriptorProperty.setAttribute("ref", "installationDescriptorExtension");        // lets find all elements which are not in the JBI namespace        Map propertiesMap = new HashMap();        propertiesMap.put("descriptorExtension", fragment);        RootBeanDefinition definition = new RootBeanDefinition(InstallationDescriptorExtension.class, new MutablePropertyValues(propertiesMap));        beanDefinitionReader.getBeanFactory().registerBeanDefinition("installationDescriptorExtension", definition);        super.processElement(element, beanDefinitionReader);    }