use of org.freeplane.core.util.XsltPipeReaderFactory in project freeplane by freeplane.
the class XmlImporter method newMap.
private void newMap(final InputStream in, final File outputFile) throws IOException, XMLException, MalformedURLException {
final Reader reader = new XsltPipeReaderFactory(xsltResource).getReader(in);
final ModeController modeController = Controller.getCurrentModeController();
final MapController mapController = modeController.getMapController();
final MapModel map = new MMapModel();
modeController.getMapController().getMapReader().createNodeTreeFromXml(map, reader, Mode.FILE);
final URL mapUrl = Compat.fileToUrl(outputFile);
map.setURL(mapUrl);
map.setSaved(false);
mapController.fireMapCreated(map);
mapController.newMapView(map);
}
Aggregations