public IDocument parse() { Document doc=new Document(); doc.address=address; handler.baseurl=doc.address; handler.setDocument(doc); handler.encoding=encoding; try { reader.Parse(isource); } catch (SaxException e) { if(e.InnerException is IOException) throw (IOException)(e.InnerException); throw new IOException("",e); } if(contentLang.Length==1){ doc.defaultLanguage=contentLang[0]; } return handler.getDocument(); }
internal void setDocument(Document doc) { this.document=doc; }