public void writeXML ( NetcdfDataset ncd , OutputStream os , boolean showCoords , String uri ) throws IOException { // Output the document, use standard formatter //XMLOutputter fmt = new XMLOutputter(" ", true); //fmt.setLineSeparator("\n"); XMLOutputter fmt = new XMLOutputter ( Format . getPrettyFormat ( ) ) ; fmt . output ( makeDocument ( ncd , showCoords , uri ) , os ) ; }
Write a NetcdfDataset as an NcML - G document to the specified stream .