Documentオブジェクト保存メソッド作成

This commit is contained in:
r-ca 2024-01-08 12:17:16 +09:00
parent 5c0fd4fdbb
commit 73fa8201d6
No known key found for this signature in database
GPG Key ID: 6A72911AC73464A9

View File

@ -16,6 +16,7 @@ import java.util.List;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.stream.StreamResult;
import dagger.assisted.Assisted;
import dagger.assisted.AssistedInject;
@ -230,13 +231,16 @@ public class FileManagerImpl implements FileManager {
Transformer transformer = transformerFactory.newTransformer();
DOMSource source = new DOMSource(document);
File file = createFile(fileName);
StreamResult result = new StreamResult(file);
transformer.transform(source, result);
} catch (Exception e) {
e.printStackTrace();
}
}
@Override
public void saveDocument(Document document, Path path) {
// TODO-rca 実装する
}
@Override