A4LGSharedFunctions.ConfigUtil.getConfigAsXMLDoc C# (CSharp) Method

getConfigAsXMLDoc() private static method

private static getConfigAsXMLDoc ( ) : XmlDocument
return System.Xml.XmlDocument
        private static XmlDocument getConfigAsXMLDoc()
        {
            XmlDocument xmld = default(XmlDocument);
            try
            {
                //Create the XML Document
                xmld = new XmlDocument();

                //Load the Xml file
                //xmld.Load(Globals.getFileAtDLLLocation("LayerViewerConfig.xml"));
                try
                {
                    string confFiles = GetConfigFile();
                    if (confFiles != null)
                    {
                        if (confFiles.Trim() != "")
                        {
                            // xmld.Load(Globals.getFileAtDLLLocation("ESRI.WaterUtilitiesTemplate.DesktopFunctions.config"));
                            xmld.Load(confFiles);
                            return xmld;

                        }

                    }
                    return null;

                }
                catch (Exception ex)
                {
                    System.Windows.Forms.MessageBox.Show(ex.Message + "\nTypically an error here is from an improperly formatted config file. \nThe structure(XML) is compromised by a change you made.");
                    return null;
                }
            }
            catch (Exception ex)
            {

                MessageBox.Show("getConfigAsXMLDoc:  " + ex.Message);
                return null;

            }
            finally
            {

            }
        }