예제 #1
0
        private void extractWordFileXML(List <FieldXML> list, string file)
        {
            string text = extractWordDocument(file);

            string[] lines = text.Split(';');
            for (int i = 0; i < lines.Length - 1; i++)
            {
                string[] fieldArray = lines[i].Split('=');
                fieldCleanUp(fieldArray);
                FieldXML field = new FieldXML(fieldArray[0], fieldArray[1]);
                list.Add(field);
            }
        }
예제 #2
0
 // Extraction Functions
 private void extractTextFileXML(List <FieldXML> list, string file)
 {
     using (FileStream s = File.OpenRead(file))
         using (TextReader reader = new StreamReader(s))
         {
             while (reader.Peek() > -1)
             {
                 string   line       = reader.ReadLine();
                 string[] fieldArray = line.Split('=');
                 fieldCleanUp(fieldArray);
                 FieldXML field = new FieldXML(fieldArray[0], fieldArray[1]);
                 list.Add(field);
             }
         }
 }