/** * parse the given URL with the given pageText using the given document adapter * @param pageURL * @param pageText * @param adapter */ public void parse( URL pageURL, String pageText, DocumentAdapter adapter ) throws IOException, SAXException { try { NekoDOMParser parser = NekoDOMParser.newParser( adapter, pageURL ); parser.parse( new InputSource( new StringReader( pageText ) ) ); Document doc=parser.getDocument(); adapter.setDocument( (HTMLDocument)doc ); } catch (NekoDOMParser.ScriptException e) { throw e.getException(); } }
/** * parse the given URL with the given pageText using the given document adapter * @param pageURL * @param pageText * @param adapter */ public void parse( URL pageURL, String pageText, DocumentAdapter adapter ) throws IOException, SAXException { try { NekoDOMParser parser = NekoDOMParser.newParser( adapter, pageURL ); parser.parse( new InputSource( new StringReader( pageText ) ) ); Document doc=parser.getDocument(); adapter.setDocument( (HTMLDocument)doc ); } catch (NekoDOMParser.ScriptException e) { throw e.getException(); } }
/** * parse the given URL with the given pageText using the given document adapter * @param pageURL * @param pageText * @param adapter */ public void parse( URL pageURL, String pageText, DocumentAdapter adapter ) throws IOException, SAXException { try { NekoDOMParser parser = NekoDOMParser.newParser( adapter, pageURL ); parser.parse( new InputSource( new StringReader( pageText ) ) ); Document doc=parser.getDocument(); adapter.setDocument( (HTMLDocument)doc ); } catch (NekoDOMParser.ScriptException e) { throw e.getException(); } }