/// <summary> /// Start parsing. WARNING: this blocks until the stream is disconnected or end stream:stream is received. /// </summary> public void Start() { try { IXmlReader reader = new AElfred.SaxDriver(); reader.SetFeature(Constants.NamespacesFeature, true); reader.SetFeature(AElfred.SaxDriver.FEATURE + "external-parameter-entities", false); reader.SetFeature(AElfred.SaxDriver.FEATURE + "external-general-entities", false); reader.ErrorHandler = this; reader.ContentHandler = this; InputSource inSource = new StreamInputSource(m_stream); inSource.Encoding = "UTF-8"; reader.Parse(inSource); } catch (Exception e) { FireOnError(e); } }
/// <summary> /// Start parsing. WARNING: this blocks until the stream is disconnected or end stream:stream is received. /// </summary> public void Start() { try { IXmlReader reader = new AElfred.SaxDriver(); reader.SetFeature(Constants.NamespacesFeature, true); reader.SetFeature(AElfred.SaxDriver.FEATURE + "external-parameter-entities", false); reader.SetFeature(AElfred.SaxDriver.FEATURE + "external-general-entities", false); reader.ErrorHandler = this; reader.ContentHandler = this; InputSource inSource = new StreamInputSource(m_stream); inSource.Encoding = "UTF-8"; reader.Parse(inSource); } catch (Exception e) { FireOnError(e); } }