static public NcmlCollectionReader open ( String ncmlLocation , Formatter errlog ) throws IOException { if ( ! ncmlLocation . startsWith ( "http:" ) && ! ncmlLocation . startsWith ( "file:" ) ) ncmlLocation = "file:" + ncmlLocation ; URL url = new URL ( ncmlLocation ) ; org . jdom2 . Document doc ; try { SAXBuilder builder = new SAXBuilder ( ) ; if ( debugURL ) System . out . println ( " NetcdfDataset URL = <" + url + ">" ) ; doc = builder . build ( url ) ; } catch ( JDOMException e ) { throw new IOException ( e . getMessage ( ) ) ; } if ( debugXML ) System . out . println ( " SAXBuilder done" ) ; return readXML ( doc , errlog , ncmlLocation ) ; }
Read an NcML file from a URL location and construct a NcmlCollectionReader from its scan or scanFmrc element .