Contact Jan Thomas Consulting

May 12, 2007

xml transformation using Sarissa

Filed under: Programming Techniques — jan @ 10:18 am

Javascript solution that works in Firefox and IE using sarissa

Use DOM and javascript and sarissa to build html code:

‘<img src=”images/’ + nodes.item(i).getAttribute(’target’) + ‘” />’ + ‘</a><br />’;
A labeled <div id=”menudiv”> gives you a way to send HTML to a document:
document.getElementById(’menudiv’).innerHTML = output;

I used this in a photo gallery to hold photo names in an xml file that can be read into html:

http://www.myxmlproject.com/projects/sherrypicsmenu/sherrypicsmenu.html

No Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URL

Leave a comment

You must be logged in to post a comment.

Powered by WordPress