Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hi forum.
I have the url of a xml file. I now wish to call and use that content on my page.
What would be the easiest way to do this?
I have tried with this code that i found in another post, but without luck.
@using umbraco.MacroEngines @inherits DynamicNodeContext @try { dynamic xmlv = new DynamicXml(umbraco.library.GetXmlDocumentByUrl("http://billet.protickets.dk/FilurenNY/servlet/InetSale.GetXMLMovieList")); <ul> @foreach (var property in xmlv) { <li> <p> @foreach (var item in property) { @item.InnerText<br /> } </p> </li> } </ul> } catch (Exception e) { @e.ToString() }
I hope someone can help me :)
This should retrieve XML data. Note, that it is not formatted. It simply displays text.
Hopefully this helps. :)
@using umbraco.MacroEngines @try { dynamic xmlv = new Umbraco.Core.Dynamics.DynamicXml(umbraco.library.GetXmlDocumentByUrl("http://billet.protickets.dk/FilurenNY/servlet/InetSale.GetXMLMovieList")); <ul> @foreach (var property in xmlv) { foreach (var item in property) { <li>@item.InnerText </li> } } </ul> } catch (Exception e) { @e.ToString() }
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.
Continue discussion
Get data from XML file
Hi forum.
I have the url of a xml file. I now wish to call and use that content on my page.
What would be the easiest way to do this?
I have tried with this code that i found in another post, but without luck.
I hope someone can help me :)
This should retrieve XML data. Note, that it is not formatted. It simply displays text.
Hopefully this helps. :)
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.