Beispiel #1
0
        private string GetHeader(PatternSearcher searcher)
        {
            PatternFound found = searcher.NextPattern(_BodyPattern);

            if (found.EndOfStreamReached == true)
            {
                throw new ApplicationException("Tag <Body> is not found.");
            }

            return(found.TextBeforePattern);
        }
Beispiel #2
0
 private void GetPages(PatternSearcher searcher)
 {
     for (PatternFound found = searcher.NextPattern(_PagePattern); found.EndOfStreamReached == false; found = searcher.NextPattern(_PagePattern))
     {
         string page = ProcessHtmlPage(found.TextBeforePattern);
         if (string.IsNullOrEmpty(page) == false)
         {
             _Writer.AddPage(page);
         }
     }
     _Writer.CloseOutputStream();
 }