System.Xml.Tests.XsltApiTestCaseBase.LoadXML C# (CSharp) Method

LoadXML() public method

public LoadXML ( String strFileLocation, DocType _docType ) : IXPathNavigable
strFileLocation String
_docType DocType
return IXPathNavigable
        public IXPathNavigable LoadXML(String strFileLocation, DocType _docType)
        {
            switch (_docType)
            {
                case DocType.XmlDocument:
                    XmlDocument xmlDocument = new XmlDocument();
                    xmlDocument.Load(strFileLocation);
                    return (IXPathNavigable)xmlDocument;

                case DocType.XPathDocument:
                    XPathDocument xPathDocument = new XPathDocument(strFileLocation);
                    return (IXPathNavigable)xPathDocument;

                default:
                    return null;
            }
        }