Return-Path: X-Original-To: apmail-cxf-commits-archive@www.apache.org Delivered-To: apmail-cxf-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 6B7B910CAE for ; Fri, 2 Aug 2013 22:19:06 +0000 (UTC) Received: (qmail 18355 invoked by uid 500); 2 Aug 2013 22:19:06 -0000 Delivered-To: apmail-cxf-commits-archive@cxf.apache.org Received: (qmail 18295 invoked by uid 500); 2 Aug 2013 22:19:06 -0000 Mailing-List: contact commits-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list commits@cxf.apache.org Received: (qmail 18288 invoked by uid 99); 2 Aug 2013 22:19:06 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 Aug 2013 22:19:06 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 Aug 2013 22:19:04 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 4683023889BF; Fri, 2 Aug 2013 22:18:43 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1509890 - /cxf/trunk/api/src/main/java/org/apache/cxf/staxutils/StaxUtils.java Date: Fri, 02 Aug 2013 22:18:43 -0000 To: commits@cxf.apache.org From: dkulp@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20130802221843.4683023889BF@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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);