You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by dk...@apache.org on 2013/08/03 00:18:43 UTC
svn commit: r1509890 -
/cxf/trunk/api/src/main/java/org/apache/cxf/staxutils/StaxUtils.java
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);