DDay.iCal.Validator.Xml.DirectoryXmlDocumentProvider.LoadXml C# (CSharp) Method

LoadXml() public method

public LoadXml ( string path ) : string
path string
return string
        public string LoadXml(string path)
        {
            if (!Path.IsPathRooted(path))
                path = Path.Combine(LocalDirectoryName, path);

            if (File.Exists(path))
            {
                string contents = null;

                FileStream fs = new FileStream(path, FileMode.Open, FileAccess.Read);
                if (fs != null)
                {
                    StreamReader sr = new StreamReader(fs);
                    contents = sr.ReadToEnd();
                    sr.Close();
                }

                return contents;
            }

            return null;
        }