Developer forum

Forum » Templates » Importing and transforming XML data

Importing and transforming XML data


Reply

How can I import XML, transform and display XML in DW content?


 


Example-data


http://xml.bilinfo.dk/forhandler/biler/demo.asp


 


The items in the XML should be displayed as a html/css list with paging.


Each item should link to a detail-page with additional info and images.


 


The XML-data changes frequently.


Replies

 
Nicolai Høeg Pedersen
Reply
hf@oerskov.dk wrote:


How can I import XML, transform and display XML in DW content?




 




Example-data




http://xml.bilinfo.dk/forhandler/biler/demo.asp




 




The items in the XML should be displayed as a html/css list with paging.




Each item should link to a detail-page with additional info and images.




 




The XML-data changes frequently.



Hi Henrik


 


I have a small module which up for a beta release. In this module you can provide a URL something and have the content displayed in a paragraph in Dynamicweb. The module has an option to specify that the URL is a XML document at you want it parsed using XSLT before displaying it. I think this little module could do the trick.


I'll send you a mail with a screendump.

 
Reply

Great module. Looks like it will do the job. To bad it's noy available yet.

 
Reply


You could do it with javascript, but then keep in mind that the XML/XSLT transformation is processed on the client instead of on the server.



If you need an example of crossbrowser xml/xslt transformations, let me know.
 
Reply
Emil Muller wrote:





You could do it with javascript, but then keep in mind that the XML/XSLT transformation is processed on the client instead of on the server.







If you need an example of crossbrowser xml/xslt transformations, let me know.



Hi Müller


 


Thanks a lot. I'd like to see the example.


 


Henrik Fosgerau

 
Reply
Ok create a new paragraph in a Dynamicweb page and switch the editor to HTML view, and paste the code below in there.



At the bottom of the code you can see which xml and xsl is called. You can change those filenames to the xml and xsl filenames you have in your local installation.



A sidenote, since it is a client side (browser) xml xsl transformation you cannot just access remote files on other servers. This is due to security restrictions of the browser. So save your XML file to your local Dynamicweb website.



Ok here's the code to be put into the HTML source of a paragraph:







 






 

You must be logged in to post in the forum