Developer forum

Forum » Templates » Load data from external xml into DW page

Load data from external xml into DW page

Klaus Bergh
Reply

Hi
I am going to make a page with data from an xml file. The contents of this file is to be displayed on a page in DW. The contents of my xml file is updated continuously and must therefore be reflected on the website.
Which modules / functions can I use this?
And can i then style the content which is read from xml file?

Thank you in advance

Klaus


Replies

 
Morten Bengtson
Reply
Hi Klaus,

You will have to implement an XSLT template to parse the XML into HTML.

Here is a few different approaches...

A) Paragraph template
Use the XSLT template as your paragraph template. You can load the XML document directly in the XSLT by using the document function.

B) Content Integrator module - "Indholdsintegration" in Danish
Insert the standard module (free!), specify the URL to the XML file and choose your XSLT file.
You can also enable caching (recommended).

C) GetXml.aspx (for local XML files - you could use the XSLT document function to also load an external XML file)
A very handy little utility for transforming XML documents, which you can use like this:
/Admin/Public/GetXml.aspx?XmlFile=/Files/Filer/MyData.xml&XsltFile=/Files/Filer/MyData.xslt&ContentType=text/html
You could then load the content from that url directly into an iframe or into a div by using some javascript magic :)


/Morten

 

You must be logged in to post in the forum