cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1509890 - /cxf/trunk/api/src/main/java/org/apache/cxf/staxutils/StaxUtils.java
Date Fri, 02 Aug 2013 22:18:43 GMT
Author: dkulp
Date: Fri Aug  2 22:18:42 2013
New Revision: 1509890

URL: http://svn.apache.org/r1509890
Log:
Add a utility method to print a DOM

Modified:
    cxf/trunk/api/src/main/java/org/apache/cxf/staxutils/StaxUtils.java

Modified: cxf/trunk/api/src/main/java/org/apache/cxf/staxutils/StaxUtils.java
URL: http://svn.apache.org/viewvc/cxf/trunk/api/src/main/java/org/apache/cxf/staxutils/StaxUtils.java?rev=1509890&r1=1509889&r2=1509890&view=diff
==============================================================================
--- cxf/trunk/api/src/main/java/org/apache/cxf/staxutils/StaxUtils.java (original)
+++ cxf/trunk/api/src/main/java/org/apache/cxf/staxutils/StaxUtils.java Fri Aug  2 22:18:42
2013
@@ -1716,6 +1716,18 @@ public final class StaxUtils {
             //shouldn't get here
         }
     }
+    public static void print(Node node) {
+        XMLStreamWriter writer = null;
+        try {
+            writer = createXMLStreamWriter(System.out);
+            copy(new DOMSource(node), writer);
+            writer.flush();
+        } catch (XMLStreamException e) {
+            throw new RuntimeException(e);
+        } finally {
+            StaxUtils.close(writer);
+        }
+    }
 
     public static String toString(Source src) {
         StringWriter sw = new StringWriter(1024);



Mime
View raw message