Author: dkulp Date: Mon Aug 5 21:47:48 2013 New Revision: 1510762 URL: http://svn.apache.org/r1510762 Log: Merged revisions 1509930 via git cherry-pick from https://svn.apache.org/repos/asf/cxf/branches/2.7.x-fixes
........ r1509930 | dkulp | 2013-08-02 21:30:49 -0400 (Fri, 02 Aug 2013) | 10 lines 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.6.x-fixes/api/src/main/java/org/apache/cxf/staxutils/StaxUtils.java Modified: cxf/branches/2.6.x-fixes/api/src/main/java/org/apache/cxf/staxutils/StaxUtils.java URL: http://svn.apache.org/viewvc/cxf/branches/2.6.x-fixes/api/src/main/java/org/apache/cxf/staxutils/StaxUtils.java?rev=1510762&r1=1510761&r2=1510762&view=diff ============================================================================== --- cxf/branches/2.6.x-fixes/api/src/main/java/org/apache/cxf/staxutils/StaxUtils.java (original) +++ cxf/branches/2.6.x-fixes/api/src/main/java/org/apache/cxf/staxutils/StaxUtils.java Mon Aug 5 21:47:48 2013 @@ -1728,6 +1728,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);
