using Umbraco.Core.Dynamics;
dynamic xmlDynObj= new DynamicXml(Umbraco.library.GetXmlDocumentByUrl(xmlURL));
foreach (dynamic eachProp in xmlDynObj.Properties.Property){
//do something with eachProp's InnerText and Attributes
}
Now in Umbraco v8, it seems this method is no longer existing (or I didn't get it right, please let me know if it still exists). I am wondering if there is any replacement/alternative for GetXmlDocumentByUrl and DynamicXml can do the same work for me?
Umbraco v8: Load and Convert XML into dynamic object with inner text and attributes
I am currently upgrading my Umbraco v7 application into Umbraco v8. I need to load XML file by its URL and convert it into a dynamic object.
XML example:
In Umbraco v7, I can do it in this way:
Now in Umbraco v8, it seems this method is no longer existing (or I didn't get it right, please let me know if it still exists). I am wondering if there is any replacement/alternative for
GetXmlDocumentByUrl
andDynamicXml
can do the same work for me?Thanks.
is working on a reply...