TeamMentor.CoreLib.TM_Xml_Database_Load_And_FileCache.getGuidanceExplorerObject C# (CSharp) Method

getGuidanceExplorerObject() public static method

public static getGuidanceExplorerObject ( this xmlFile ) : guidanceExplorer
xmlFile this
return urn.microsoft.guidanceexplorer.guidanceExplorer
        public static guidanceExplorer getGuidanceExplorerObject(this string xmlFile)
        {
            try
            {
                var fileContents = xmlFile.fileContents();
                if(fileContents.contains("<guidanceExplorer xmlns=\"urn:microsoft:guidanceexplorer\">")) // handle legacy guidanceExplorer files
                    fileContents = fileContents.replace("<guidanceExplorer xmlns=\"urn:microsoft:guidanceexplorer\">", "<guidanceExplorer>");
                //fileContents.info();
                return fileContents.deserialize<guidanceExplorer>(false);
                //"loading :{0}".debug(xmlFile);
                //return guidanceExplorer.Load(xmlFile);
            }
            catch(Exception ex)
            {
                "[getGuidanceExplorerObject]: {0}".error(ex.Message);
            }
            return null;
        }