示例#1
0
 static void ProcessWikipediaFile(string filename)
 {
     using (FileStream file = new FileStream(filename, FileMode.OpenOrCreate))
     {
         using (BufferedStream stream = new BufferedStream(file))
         {
             var pageProcessor = new PageXmlToJsonProcessor();
             pageProcessor.PageProcessed += Program.pageProcessor_PageProcessed;
             var processor = new WikipediaXmlProcessor(stream, pageProcessor);
             processor.ProcessPages();
         }
     }
 }
示例#2
0
 static void ProcessWikipediaFile(string filename)
 {
     using (FileStream file = new FileStream(filename, FileMode.OpenOrCreate))
     {
         using (BufferedStream stream = new BufferedStream(file))
         {
             var pageProcessor = new PageXmlToJsonProcessor();
             pageProcessor.PageProcessed += Program.pageProcessor_PageProcessed;
             var processor = new WikipediaXmlProcessor(stream, pageProcessor);
             processor.ProcessPages();
         }
     }
 }