Class DomTripStAXSource
java.lang.Object
javax.xml.transform.stax.StAXSource
eu.maveniverse.domtrip.stax.DomTripStAXSource
- All Implemented Interfaces:
Source
A
StAXSource backed by a domtrip Document for JAXP interoperability.
This class enables a domtrip document to be used directly with JAXP APIs such as
Transformer and Validator
without requiring intermediate serialization to a string or stream.
Usage Examples:
// XSLT transformation
Document doc = Document.of(xml);
StAXSource source = DomTripStAXSource.of(doc);
transformer.transform(source, result);
// Schema validation
StAXSource source = DomTripStAXSource.of(doc);
validator.validate(source);
- Since:
- 1.3.0
- See Also:
-
Field Summary
Fields inherited from class StAXSource
FEATURE -
Method Summary
Modifier and TypeMethodDescriptionstatic DomTripStAXSourceCreates a new StAXSource backed by the given document.Methods inherited from class StAXSource
getSystemId, getXMLEventReader, getXMLStreamReader, isEmpty, setSystemId
-
Method Details
-
of
Creates a new StAXSource backed by the given document.- Parameters:
doc- the document to use as the source- Returns:
- a new DomTripStAXSource
- Throws:
IllegalArgumentException- if doc is null
-