Class SaveDocument


  • public final class SaveDocument
    extends Object
    Utility allowing to save a W3C DOM document to an XML file.
    • Method Detail

      • save

        public static void save​(Document doc,
                                File file)
                         throws IOException
        Save specified document to specified UTF-8, unindented, XML file.

        Does not save the DOCTYPE of the document if any.

        Parameters:
        doc - document to be saved
        file - save file
        Throws:
        IOException - if for any reason, this method fails