cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1509930 - /cxf/branches/2.7.x-fixes/api/src/main/java/org/apache/cxf/staxutils/StaxUtils.java
Date Sat, 03 Aug 2013 01:30:49 GMT
Author: dkulp
Date: Sat Aug  3 01:30:49 2013
New Revision: 1509930

URL: http://svn.apache.org/r1509930
Log:
Merged revisions 1509890 via  git cherry-pick from
https://svn.apache.org/repos/asf/cxf/trunk

........
  r1509890 | dkulp | 2013-08-02 18:18:42 -0400 (Fri, 02 Aug 2013) | 2 lines

  Add a utility method to print a DOM

........

Modified:
    cxf/branches/2.7.x-fixes/api/src/main/java/org/apache/cxf/staxutils/StaxUtils.java

Modified: cxf/branches/2.7.x-fixes/api/src/main/java/org/apache/cxf/staxutils/StaxUtils.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.7.x-fixes/api/src/main/java/org/apache/cxf/staxutils/StaxUtils.java?rev=1509930&r1=1509929&r2=1509930&view=diff
==============================================================================
--- cxf/branches/2.7.x-fixes/api/src/main/java/org/apache/cxf/staxutils/StaxUtils.java (original)
+++ cxf/branches/2.7.x-fixes/api/src/main/java/org/apache/cxf/staxutils/StaxUtils.java Sat
Aug  3 01:30:49 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) throws XMLStreamException {
         StringWriter sw = new StringWriter(1024);



Mime
View raw message