-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathProgram.cs
34 lines (28 loc) · 1.12 KB
/
Program.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace XmlDocumentProcessor
{
internal class Program
{
static void Main(string[] args)
{
Console.OutputEncoding = Encoding.UTF8;
// 1. Створити об'єкт XmlDocumentProcessor.
XmlDocumentProcessor processor = new XmlDocumentProcessor();
// 2. Вибрати стратегію.
// Для аналізу:
processor.SetStrategy(new LibraryAnalysisStrategy());
// Для перетворення в HTML:
// processor.SetStrategy(new HtmlTransformationStrategy());
// 3. Вказати шлях до XML-файлу.
string xmlFilePath = "D:\\Visual Studio\\Projects\\XmlDocumentProcessor\\books.xml";
// 4. Обробка XML-документа.
processor.ProcessDocument(xmlFilePath);
Console.WriteLine("Обробка завершена.");
Console.ReadLine(); // Затримати консоль
}
}
}