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

LoadXML() public method

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

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

                default:
                    return null;
            }
        }