static public NcmlCollectionReader readNcML ( String ncmlString , Formatter errlog ) throws IOException { StringReader reader = new StringReader ( ncmlString ) ; org . jdom2 . Document doc ; try { SAXBuilder builder = new SAXBuilder ( ) ; if ( debugURL ) System . out . println ( " NetcdfDataset NcML String = <" + ncmlString + ">" ) ; doc = builder . build ( new StringReader ( ncmlString ) ) ; } catch ( JDOMException e ) { throw new IOException ( e . getMessage ( ) ) ; } if ( debugXML ) System . out . println ( " SAXBuilder done" ) ; return readXML ( doc , errlog , null ) ; }
Read an NcML file from a String and construct a NcmlCollectionReader from its scan or scanFmrc element .