package fr.insee.rmes.utils.ddi;

import java.io.StringWriter;

import javax.xml.transform.OutputKeys;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerException;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.stream.StreamResult;

import org.w3c.dom.Node;

public class UtilXML {

	 public static String nodeToString(Node node) {
		    StringWriter sw = new StringWriter();
		    try {
		      Transformer t = TransformerFactory.newInstance().newTransformer();
		      t.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "yes");
		      t.setOutputProperty(OutputKeys.INDENT, "yes");
		      t.transform(new DOMSource(node), new StreamResult(sw));
		    } catch (TransformerException te) {
		      System.out.println("nodeToString Transformer Exception");
		    }
		    return sw.toString();
		  }
	
}

@@ -338,49 +338,208 @@
 org.
-w3c.dom.Node;%0A%0Apublic class UtilXML %7B%0A%0A%09 
+apache.logging.log4j.LogManager;%0Aimport org.apache.logging.log4j.Logger;%0Aimport org.w3c.dom.Node;%0A%0Apublic class UtilXML %7B%0A%0A%09private final static Logger logger = LogManager.getLogger(UtilXML.class);%0A%0A%09
 publ
@@ -583,20 +583,16 @@
 de) %7B%0A%09%09
-    
 StringWr
@@ -627,20 +627,16 @@
 ;%0A%09%09
-    
 try %7B%0A%09%09
     
@@ -631,22 +631,17 @@
 try %7B%0A%09%09
-      
+%09
 Transfor
@@ -697,30 +697,25 @@
 former();%0A%09%09
-      
+%09
 t.setOutputP
@@ -765,22 +765,17 @@
 es%22);%0A%09%09
-      
+%09
 t.setOut
@@ -815,22 +815,17 @@
 es%22);%0A%09%09
-      
+%09
 t.transf
@@ -874,20 +874,16 @@
 sw));%0A%09%09
-    
 %7D catch 
@@ -916,32 +916,21 @@
 %7B%0A%09%09
-      System.out.println
+%09logger.error
 (%22no
@@ -971,20 +971,12 @@
 ;%0A%09%09
-    %7D%0A%09%09    
+%7D%0A%09%09
 retu
@@ -998,13 +998,9 @@
 );%0A%09
-%09  
 %7D%0A
-%09
 %0A%7D%0A

Remove println...