com.qizx.api.util
Class PushStreamResult
java.lang.Object
javax.xml.transform.sax.SAXResult
com.qizx.api.util.PushStreamResult
- All Implemented Interfaces:
- Result
public class PushStreamResult
- extends SAXResult
An extension of SAXResult that adapts to XMLPushStream.
Can be used to store the result of a XSLT transformation into a Document of
an XML Library
.
To perform this operation, use Library.beginImportDocument(String)
,
and wrap the returned handler in a PushStreamResult, which is then used as
output by the XSLT transformation. After the XSLT transformation, it is
compulsory to call endImportDocument:
Library lib = ...; // a XML Library where the result is stored
javax.xml.transform.Transformer transformer = ... ; // XSLT processor
javax.xml.transform.Source source = ...; // source to be transformed
PushStreamResult result = new PushStreamResult(lib.beginImportDocument());
transformer.transform(source, result);
Document doc = lib.endImportDocument();
//... doc can be used to set Properties
PushStreamResult
public PushStreamResult(XMLPushStream output)
- Builds a SAXResult that writes to a XMLPushStream.
- Parameters:
output
- the XMLPushStream output