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

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

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

--- trunk/libxmltv/Core/XMLTVSource.cs	2013/03/08 03:36:44	44
+++ trunk/libxmltv/Core/XMLTVSource.cs	2013/03/08 12:07:00	57
@@ -4,6 +4,7 @@
 using System.Text;
 using libxmltv.Interfaces;
 using System.Diagnostics;
+using System.Xml.Linq;
 
 namespace libxmltv.Core
 {
@@ -19,10 +20,13 @@
         private XMLTVRuntimeInstance instance;
         protected XMLTVSource(string sourcename, string generatorname, string generatorurl)
         {
+            this.SourceName = sourcename;
+            this.GeneratorName = generatorname;
+            this.GeneratorUrl = generatorurl;
         }
         protected XMLTVSource(XMLTVRuntimeInstance xmltv)
         {
-            XMLTV_LOGGER.Log.Verbose.Debug.WriteLine("Creating Instance of XMLTVSource");
+            xmltv_logger.Verbose.Debug.WriteLine("Creating Instance of XMLTVSource");
             //IXMLTV_PARSER _xmltv;
             //if (!Internals.VerifyInstance<IXMLTV_PARSER>(xmltv, out _xmltv)) { return; }
             //XMLTV_PARSER = _xmltv;
@@ -39,13 +43,13 @@
 
         private void Create()
         {
-            var doc = instance.XmlDoc;
+            var doc = XDocument.Parse(instance.XmlDoc);
             Debug.Assert(doc.Root.Name == XMLTVConstants.ROOT_ELEMENT, string.Format("Expected Root Element: '{0}' but read: '{1}'", XMLTVConstants.ROOT_ELEMENT, doc.Root.Name));
-            //XMLTV_LOGGER.Log.Verbose.Debug.WriteLine("\tRoot: {0}", doc.Root.Name);
+            //xmltv_logger.Verbose.Debug.WriteLine("\tRoot: {0}", doc.Root.Name);
             var attributes = doc.Root.Attributes().ToList();
             foreach (var attribute in attributes)
             {
-                //XMLTV_LOGGER.Log.Verbose.Debug.WriteLine("\t{0}: {1}", attribute.Name, attribute.Value);
+                //xmltv_logger.Verbose.Debug.WriteLine("\t{0}: {1}", attribute.Name, attribute.Value);
                 entries.Add(attribute.Name.ToString(), attribute.Value);
             }
 

 

  ViewVC Help
Powered by ViewVC 1.1.22