public class DocumentMapper extends Object implements Mapper<Document>
Mapper that loads the contents of a valid XML Source
(e.g.: file, URL) as a W3C Document.
NOTE: DOCTYPE declarations (either internal or external) are disabled for security reasons.
| Constructor and Description |
|---|
DocumentMapper() |
| Modifier and Type | Method and Description |
|---|---|
Document |
apply(InputStream inputStream)
Applies this
Mapper into the given input. |
ConfigurationHelper<Document> |
configurationHelper(Document document)
Creates a new
ConfigurationHelper instance recommended by this Mapper. |
public Document apply(InputStream inputStream) throws IOException
MapperMapper into the given input.
Note: The input stream must be closed by the caller after the mapping operation.
apply in interface Mapper<Document>inputStream - the input stream to be mappedIOException - if a low-level I/O problem (such and unexpected end-of-input, or
network error) occurspublic ConfigurationHelper<Document> configurationHelper(Document document)
MapperConfigurationHelper instance recommended by this Mapper.configurationHelper in interface Mapper<Document>document - the configuration object to be used by the helperConfigurationHelper instanceCopyright © 2023. All rights reserved.