Example #1
0
 public void LoadXml(string xml)
 {
     if (!string.IsNullOrEmpty(xml))
     {
         DomLoader.Load(xml, this);
     }
 }
Example #2
0
 public bool LoadStream(Stream stream)
 {
     try
     {
         using (var sr = new StreamReader(stream))
         {
             DomLoader.Load(sr, this);
             return(true);
         }
     }
     catch
     {
         return(false);
     }
 }
Example #3
0
 public bool LoadFile(string filename)
 {
     if (File.Exists(filename))
     {
         try
         {
             using (var sr = new StreamReader(File.OpenRead(filename)))
             {
                 DomLoader.Load(sr, this);
                 return(true);
             }
         }
         catch
         {
             return(false);
         }
     }
     return(false);
 }