Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'mcs/doctools/src/Console/docval.cs')
-rw-r--r--mcs/doctools/src/Console/docval.cs94
1 files changed, 0 insertions, 94 deletions
diff --git a/mcs/doctools/src/Console/docval.cs b/mcs/doctools/src/Console/docval.cs
deleted file mode 100644
index 9c3b691c609..00000000000
--- a/mcs/doctools/src/Console/docval.cs
+++ /dev/null
@@ -1,94 +0,0 @@
-// docval.cs
-//
-// Adam Treat (manyoso@yahoo.com)
-// (C) 2002 Adam Treat
-//
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; either version 2 of the License, or
-// (at your option) any later version.
-
-using System;
-using System.Xml;
-
-namespace Mono.Util {
-
- class DocVal {
-
- string file;
-
- void Usage()
- {
- Console.Write ("docval [file]\n\n");
- }
-
- public static void Main(string[] args)
- {
- DocVal val = new DocVal(args);
- }
-
- public DocVal(string [] args)
- {
- bool pass = true;
- file = null;
- int argc = args.Length;
-
- for(int i = 0; i < argc; i++) {
- string arg = args[i];
- if(arg.EndsWith(".xml")) {
- file = arg;
- }
- }
-
- if(file == null) {
- Usage();
- return;
- }
-
- try {
- XmlTextReader read = new XmlTextReader(file);
- XmlValidatingReader validate = new XmlValidatingReader(read);
- validate.ValidationType = ValidationType.Auto;
- while (validate.Read()) {
- switch (validate.NodeType) {
- case XmlNodeType.XmlDeclaration:
- Console.WriteLine("** XML declaration");
- break;
- case XmlNodeType.DocumentType:
- Console.WriteLine("** DocumentType node");
- break;
- case XmlNodeType.Document:
- Console.WriteLine("** Document node");
- break;
- case XmlNodeType.Element:
- Console.WriteLine("** Element: {0}", validate.Name);
- break;
- case XmlNodeType.EndElement:
- Console.WriteLine("** End Element: {0}", validate.Name);
- break;
- case XmlNodeType.Text:
- Console.WriteLine("** Text: {0}", validate.Value);
- break;
- case XmlNodeType.Comment:
- Console.WriteLine("** Comment: {1}", validate.Name, validate.Value);
- break;
- case XmlNodeType.Whitespace:
- break;
- default:
- pass = false;
- Console.WriteLine("** ERROR: Unknown node type");
- break;
- }
- }
- } catch (Exception e) {
- pass = false;
- Console.WriteLine(e);
- }
- if(pass) {
- Console.Write("\n Validation: PASSED!\n\n");
- } else {
- Console.Write("\n Validation: FAILED!\n\n");
- }
- }
- }
-}