Load() public final method

public final Load ( [ filename ) : void
filename [
return void
 public static XmlDocumentEx LoadStream(Stream stream)
 {
     try
     {
         XmlDocument doc = new XmlDocumentEx();
         doc.Load(stream);
         return((XmlDocumentEx)doc);
     }
     catch (Exception ex)
     {
         Log.Warn(ex, string.Format("Cannot load xml. {1}\r\n{2}", ex.Message, Environment.StackTrace));
         return(null);
     }
 }
        public static XmlDocumentEx LoadFile([NotNull] string path)
        {
            Assert.ArgumentNotNull(path, "path");
              if (!FileSystem.FileSystem.Local.File.Exists(path))
              {
            throw new FileIsMissingException("The " + path + " doesn't exists");
              }

              var document = new XmlDocumentEx
              {
            FilePath = path
              };
              document.Load(path);
              return document;
        }
Example #3
0
        public static XmlDocumentEx LoadFile([NotNull] string path)
        {
            Assert.ArgumentNotNull(path, "path");
            if (!FileSystem.FileSystem.Local.File.Exists(path))
            {
                throw new FileIsMissingException("The " + path + " doesn't exists");
            }

            var document = new XmlDocumentEx
            {
                FilePath = path
            };

            document.Load(path);
            return(document);
        }
        public static XmlDocumentEx LoadFileSafe([NotNull] string path)
        {
            Assert.ArgumentNotNull(path, "path");

            if (!FileSystem.FileSystem.Local.File.Exists(path))
            {
                return(null);
            }

            var document = new XmlDocumentEx
            {
                FilePath = path
            };

            document.Load(path);
            return(document);
        }
        public static XmlDocumentEx LoadFileSafe([NotNull] string path)
        {
            Assert.ArgumentNotNull(path, "path");

              if (!FileSystem.FileSystem.Local.File.Exists(path))
              {
            return null;
              }

              var document = new XmlDocumentEx
              {
            FilePath = path
              };

              document.Load(path);
              return document;
        }