changeset 336:2c968defd878

Fix debug helper toString(Node). artifacts/trunk@2816 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Fri, 23 Sep 2011 08:42:17 +0000
parents e7d3f74854fb
children 6d239c58c636
files ChangeLog artifacts-common/src/main/java/de/intevation/artifacts/common/utils/XMLUtils.java
diffstat 2 files changed, 8 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Fri Sep 23 08:29:48 2011 +0000
+++ b/ChangeLog	Fri Sep 23 08:42:17 2011 +0000
@@ -1,3 +1,10 @@
+2011-09-23	Felix Wolfsteller	<felix.wolfsteller@intevation.de>
+
+	Fix debug helper toString(Node).
+
+	* artifacts-common/src/main/java/de/intevation/artifacts/common/utils/XMLUtils.java:
+	  (toString(Node)): Fix issue with node from "wrong" document.
+
 2011-09-23	Felix Wolfsteller	<felix.wolfsteller@intevation.de>
 
 	Added XMLUtils functions helping to debug parts of xml documents.
--- a/artifacts-common/src/main/java/de/intevation/artifacts/common/utils/XMLUtils.java	Fri Sep 23 08:29:48 2011 +0000
+++ b/artifacts-common/src/main/java/de/intevation/artifacts/common/utils/XMLUtils.java	Fri Sep 23 08:42:17 2011 +0000
@@ -199,7 +199,7 @@
      */
     public final static String toString(Node node) {
         Document doc = newDocument();
-        doc.appendChild(node);
+        doc.importNode(node, true);
         return toString(doc);
     }
      

http://dive4elements.wald.intevation.org