blob: 724c7277eadaa79e0747a7fe1e2dff3501b9a509 (
plain)
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
|
using System;
using System.IO;
using System.Text;
using System.Xml;
namespace Mono.Documentation {
public class Normalizer {
public static void Run (string [] args)
{
if (args == null) {
Console.WriteLine ("normalize.exe <files>");
Environment.Exit (0);
}
foreach (string arg in args) {
XmlDocument document = new XmlDocument ();
try {
document.Load (arg);
StreamWriter writer = new StreamWriter (arg, false, new UTF8Encoding (false));
document.Save (writer);
writer.Close ();
} catch (XmlException e) {
Console.WriteLine (arg + " is not a wellformed XML document.");
Console.WriteLine (e.Message);
}
}
}
}
}
|