public synchronized Node parse ( URL url ) throws IOException , SAXException { Node n = null ; InputStream is = url . openStream ( ) ; try { n = parse ( is ) ; } finally { try { is . close ( ) ; } catch ( Exception e ) { // xerces closes streams you give it to parse, so this close() will throw an // exception. // This behavior is stupid, so we should not assume it. } } return n ; }
Parse URL .