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

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

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

revision 81 by william, Sat Mar 9 12:23:27 2013 UTC revision 83 by william, Sat Mar 9 12:41:07 2013 UTC
# Line 352  namespace libxmltv.Core Line 352  namespace libxmltv.Core
352                      }                      }
353                  }                  }
354              }              }
355              if (handler_type == null) { throw new Exception("Unable to find a compatible handler to parse document root."); }              if (handler_type == null)
356                {
357                    StringBuilder node_builder = new StringBuilder();
358                    node_builder.AppendFormat("<{0} ", root.Name);
359                    if (root.HasAttributes) { foreach (var attribute in root.Attributes()) { node_builder.AppendFormat("{0}=\"{1}\" ", attribute.Name, attribute.Value); } }
360                    string node_text = string.Format("{0}>", node_builder.ToString().TrimEnd(new char[] { ' ' }));
361                    throw new Exception(string.Format("Unable to find a compatible handler to parse node: {0}", node_text));
362                }
363              xmltv_logger.Verbose.Debug.WriteLine("Created handler for root: '{0}'", root_name.ToString());              xmltv_logger.Verbose.Debug.WriteLine("Created handler for root: '{0}'", root_name.ToString());
364              raw_instance = Activator.CreateInstance(handler_type, flags, null, new object[] { gInstance }, culture);              raw_instance = Activator.CreateInstance(handler_type, flags, null, new object[] { gInstance }, culture);
365          }          }
# Line 398  namespace libxmltv.Core Line 405  namespace libxmltv.Core
405                      }                      }
406                  }                  }
407              }              }
408              if (handler_type == null) { throw new Exception("Unable to find a compatible handler to parse document root."); }              if (handler_type == null)
409                {
410                    StringBuilder node_builder = new StringBuilder();
411                    node_builder.AppendFormat("<{0} ", node.Name);
412                    if (node.HasAttributes) { foreach (var attribute in node.Attributes()) { node_builder.AppendFormat("{0}=\"{1}\" ", attribute.Name, attribute.Value); } }
413                    string node_text = string.Format("{0}>", node_builder.ToString().TrimEnd(new char[] { ' ' }));
414                    throw new Exception(string.Format("Unable to find a compatible handler to parse node: {0}", node_text));
415                }
416              xmltv_logger.Verbose.Debug.WriteLine("Created handler for node: '{0}'", node_name.ToString());              xmltv_logger.Verbose.Debug.WriteLine("Created handler for node: '{0}'", node_name.ToString());
417              raw_instance = Activator.CreateInstance(handler_type, flags, null, new object[] { gInstance, node }, culture);              raw_instance = Activator.CreateInstance(handler_type, flags, null, new object[] { gInstance, node }, culture);
418              return true;              return true;

Legend:
Removed from v.81  
changed lines
  Added in v.83

  ViewVC Help
Powered by ViewVC 1.1.22