Class TraxUtils
java.lang.Object
org.springframework.xml.transform.TraxUtils
Convenient utility methods for dealing with TrAX.
- Since:
- 1.5.0
- Author:
- Arjen Poutsma
-
Nested Class Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
doWithResult
(Result result, TraxUtils.ResultCallback callback) static void
doWithSource
(Source source, TraxUtils.SourceCallback callback) static Document
getDocument
(DOMSource source)
-
Constructor Details
-
TraxUtils
public TraxUtils()
-
-
Method Details
-
getDocument
- Parameters:
source
- the DOM source- Returns:
- the document
-
doWithSource
Performs the given callback operation on aSource
. Supports both the JAXP 1.4StAXSource
and the Spring 3.0StaxSource
.- Parameters:
source
- source to look atcallback
- the callback to invoke for each kind of source- Throws:
Exception
-
doWithResult
Performs the given callback operation on aResult
. Supports both the JAXP 1.4StAXResult
and the Spring 3.0StaxSource
.- Parameters:
result
- result to look atcallback
- the callback to invoke for each kind of result- Throws:
Exception
-