/[xmltv_parser]/trunk/libxmltv/Core/XMLTVLoader.cs
ViewVC logotype

Diff of /trunk/libxmltv/Core/XMLTVLoader.cs

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

--- trunk/libxmltv/Core/XMLTV_LOADER.cs	2013/03/07 09:26:43	16
+++ trunk/libxmltv/Core/XMLTV_LOADER.cs	2013/03/07 10:04:58	21
@@ -5,6 +5,7 @@
 using libxmltv.Interfaces;
 using System.IO;
 using Enterprise.Logging;
+using System.Xml.Linq;
 
 namespace libxmltv.Core
 {
@@ -56,7 +57,16 @@
         private void LoadXml()
         {
             XMLTV_LOGGER.Log.Info.WriteLine("Loading XMLTV File: {0}", XmlFile.Name);
-            XMLTV_LOGGER.Log.Warn.WriteLine("XML File Loading has not been implemented yet!");
+            //XMLTV_LOGGER.Log.Warn.WriteLine("XML File Loading has not been implemented yet!");
+            try
+            {
+                XDocument doc = XDocument.Load(XmlFile.FullName);
+            }
+            catch (Exception ex)
+            {
+                XMLTV_LOGGER.Log.Error.WriteLine("Failed to load XMLTV File: {0}", XmlFile.Name);
+                XMLTV_LOGGER.Log.Error.WriteLine(ex.GetBaseException().ToString());
+            }
         }
     }
 }

 

  ViewVC Help
Powered by ViewVC 1.1.22