Spring Web Services Framework

org.springframework.xml.transform
Class TraxUtils

java.lang.Object
  extended by org.springframework.xml.transform.TraxUtils

public abstract class TraxUtils
extends Object

Convenient utility methods for dealing with TrAX.

Since:
1.5.0
Author:
Arjen Poutsma

Nested Class Summary
static interface TraxUtils.ResultCallback
          Callback interface invoked on each sort of Result.
static interface TraxUtils.SourceCallback
          Callback interface invoked on each sort of Source.
 
Constructor Summary
TraxUtils()
           
 
Method Summary
static void doWithResult(Result result, TraxUtils.ResultCallback callback)
          Performs the given callback operation on a Result.
static void doWithSource(Source source, TraxUtils.SourceCallback callback)
          Performs the given callback operation on a Source.
static Document getDocument(DOMSource source)
          Returns the Document of the given DOMSource.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TraxUtils

public TraxUtils()
Method Detail

getDocument

public static Document getDocument(DOMSource source)
Returns the Document of the given DOMSource.

Parameters:
source - the DOM source
Returns:
the document

doWithSource

public static void doWithSource(Source source,
                                TraxUtils.SourceCallback callback)
                         throws Exception
Performs the given callback operation on a Source. Supports both the JAXP 1.4 StAXSource and the Spring 3.0 StaxSource.

Parameters:
source - source to look at
callback - the callback to invoke for each kind of source
Throws:
Exception

doWithResult

public static void doWithResult(Result result,
                                TraxUtils.ResultCallback callback)
                         throws Exception
Performs the given callback operation on a Result. Supports both the JAXP 1.4 StAXResult and the Spring 3.0 StaxSource.

Parameters:
result - result to look at
callback - the callback to invoke for each kind of result
Throws:
Exception

Spring Web Services Framework

Copyright © 2005-2013 The Spring Web Services Framework. All Rights Reserved.