- final Map<String, String> rootNodeProperty) {
- try {
- final DocumentBuilder documentBuilder = getDocumentBuilderFactory().newDocumentBuilder();
- final Document document = documentBuilder.newDocument();
- final Element rootElement = document.createElementNS(namespace, tagName);
- for (final Map.Entry<String, String> entry : rootNodeProperty.entrySet()) {
- final Element propertyElement = document.createElement(entry.getKey());
- propertyElement.setTextContent(entry.getValue());
- rootElement.appendChild(propertyElement);
- }
- rootElement.appendChild(document.adoptNode(node));
- document.appendChild(rootElement);
- return document;
- } catch (final ParserConfigurationException exception) {
- throw new DataValidationException("Can't parse XML", "XML can't be parsed", exception);
+ final Map<String, String> rootNodeProperty)
+ throws ParserConfigurationException {
+ final DocumentBuilder documentBuilder = getDocumentBuilderFactory().newDocumentBuilder();
+ final Document document = documentBuilder.newDocument();
+ final Element rootElement = document.createElementNS(namespace, tagName);
+ for (final Map.Entry<String, String> entry : rootNodeProperty.entrySet()) {
+ final Element propertyElement = document.createElement(entry.getKey());
+ propertyElement.setTextContent(entry.getValue());
+ rootElement.appendChild(propertyElement);