public DocType GetDocType(String s) { switch (s.ToUpper()) { case "XPATHDOCUMENT": return DocType.XPathDocument; case "XMLDOCUMENT": return DocType.XmlDocument; default: // DocType Type not important, using default return DocType.XPathDocument; } }