ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/xmltv_parser/trunk/libxmltv/Core/XMLTV_LOADER.cs
(Generate patch)

Comparing trunk/libxmltv/Core/XMLTV_LOADER.cs (file contents):
Revision 14 by william, Thu Mar 7 09:05:18 2013 UTC vs.
Revision 19 by william, Thu Mar 7 10:00:40 2013 UTC

--- trunk/libxmltv/Core/XMLTV_LOADER.cs	2013/03/07 09:05:18	14
+++ trunk/libxmltv/Core/XMLTV_LOADER.cs	2013/03/07 10:00:40	19
@@ -5,6 +5,7 @@ using System.Text;
 using libxmltv.Interfaces;
 using System.IO;
 using Enterprise.Logging;
+using System.Xml.Linq;
 
 namespace libxmltv.Core
 {
@@ -15,8 +16,7 @@ namespace libxmltv.Core
     {
         public static object CreateLoader(string xml_file)
         {
-            xmltv_logger.Initialize();
-            xmltv_logger.Log.Debug.WriteLine("Logged from XMLTV.CreateLoader");
+            XMLTV_LOGGER.Initialize();
             XMLTV_LOADER loader = new XMLTV_LOADER(xml_file);
             return loader;
         }
@@ -47,10 +47,18 @@ namespace libxmltv.Core
         private string xmlfile = string.Empty;
         public XMLTV_LOADER(string xml_file)
         {
-            xmlfile = xml_file;            
+            xmlfile = xml_file;
+            LoadXml();
         }
         #region IXMLTV_LOADER
         public FileInfo XmlFile { get { return new FileInfo(xmlfile); } }
         #endregion
+
+        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!");
+            XDocument doc = XDocument.Load(XmlFile.FullName);
+        }
     }
 }