Skip to content
Error executing template "Designs/aal/Paragraph/rejseplan.cshtml"
System.Xml.XmlException: The 'br' start tag on line 8 position 49 does not match the end tag of 'p'. Line 8, position 183.
   at System.Xml.XmlTextReaderImpl.Throw(Exception e)
   at System.Xml.XmlTextReaderImpl.ThrowTagMismatch(NodeData startTag)
   at System.Xml.XmlTextReaderImpl.ParseEndElement()
   at System.Xml.XmlTextReaderImpl.ParseElementContent()
   at System.Xml.XmlLoader.LoadNode(Boolean skipOverWhitespace)
   at System.Xml.XmlLoader.LoadDocSequence(XmlDocument parentDoc)
   at System.Xml.XmlDocument.Load(XmlReader reader)
   at System.Xml.XmlDocument.Load(String filename)
   at CompiledRazorTemplates.Dynamic.RazorEngine_e982339eb1f04aa692db96278c4ccc4a.Execute() in D:\dynamicweb.net\Solutions\aal.dw9.dynamicweb-cms.com\files\Templates\Designs\aal\Paragraph\rejseplan.cshtml:line 6
   at RazorEngine.Templating.TemplateBase.RazorEngine.Templating.ITemplate.Run(ExecuteContext context, TextWriter reader)
   at RazorEngine.Templating.RazorEngineService.RunCompile(ITemplateKey key, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag)
   at RazorEngine.Templating.RazorEngineServiceExtensions.<>c__DisplayClass16_0.<RunCompile>b__0(TextWriter writer)
   at RazorEngine.Templating.RazorEngineServiceExtensions.WithWriter(Action`1 withWriter)
   at Dynamicweb.Rendering.RazorTemplateRenderingProvider.Render(Template template)
   at Dynamicweb.Rendering.TemplateRenderingService.Render(Template template)
   at Dynamicweb.Rendering.Template.RenderRazorTemplate()

1 @using System; 2 @using System.Xml; 3 4 @{ 5 XmlDocument rejseplanXML = new XmlDocument(); 6 rejseplanXML.Load(GetString("Item.FeedURL")); 7 8 XmlNodeList nodeList = rejseplanXML.DocumentElement.SelectNodes("Departure"); 9 10 int limit = GetInteger("Item.Limit"); 11 if (limit == 0 || limit > nodeList.Count) { 12 limit = nodeList.Count; 13 } 14 } 15 16 <div class="table-responsive"> 17 <table> 18 <thead> 19 <tr> 20 <th>@Translate("RejseplanTime", "Tid")</th> 21 <th>@Translate("RejseplanBusno", "Bus")</th> 22 <th>@Translate("RejseplanDirection", "Retning")</th> 23 </tr> 24 </thead> 25 <tbody> 26 @for (int i = 0; i < limit; i++) { 27 <tr> 28 <td data-header='@Translate("RejseplanTime", "Tid")'>@nodeList[i].Attributes["time"].Value</td> 29 <td data-header='@Translate("RejseplanBusno", "Bus")'>@nodeList[i].Attributes["name"].Value</td> 30 <td data-header='@Translate("RejseplanDirection", "Retning")'>@nodeList[i].Attributes["direction"].Value</td> 31 </tr> 32 } 33 </tbody> 34 </table> 35 </div> 36 37 @SnippetStart("JavaScriptBottom") 38 @if (System.Web.HttpContext.Current.Items["TablesJSLoaded"] != "true") { 39 System.Web.HttpContext.Current.Items["TablesJSLoaded"] = "true"; 40 41 <script src="/Files/Templates/Designs/aal/assets/js/tables.min.js" async></script> 42 } 43 @SnippetEnd("JavaScriptBottom") 44