| BachusII on May 24, 2009 at 12:17:41 PM (# 4) XSL translation? can't remember but there are examples somewhere on this website. MHenke on May 25, 2009 at 6:40:40 AM (# 5)I'm not sure how XSLT is supported on the client-side nowadays. If so, that could be quite an elegant option.
Apart from that, I can think of two other ways: Data (DOM-) centric: Traverse (the whole) XML menu data using DOM-methods (like getFirstChild, getNextSibling, getWhateverNode). More function centric: Selectively pull nodes from the XML menu data using XPath expressions.
In both cases you could use JavaScript DOM methods to build the menu elements within the HTML page, using the retrieved menu data.
Monte on May 25, 2009 at 6:49:51 AM (# 6)"Data (DOM-) centric: Traverse (the whole) XML menu data using DOM-methods (like getFirstChild, getNextSibling, getWhateverNode). More function centric: Selectively pull nodes from the XML menu data using XPath expressions."
Either of these would work, MHenke. I'm just not sure exactly how to do it. Could you point me to an example on the web? MHenke on May 26, 2009 at 2:41:05 AM (# 7)TBH, nope, I've never seen such code in a working example (tho I've done it server-side). I'm just sure that it should. :) BachusII on May 26, 2009 at 10:20:52 AM (# 8)Surrounded by a lot of ajax, but it shows what I meant. http://www.ibm.com/developerworks/xml/library/x-xmlajaxpt2/#listing6 Terry Young on Jun 11, 2009 at 9:58:14 AM (# 9)XML DOM Traversing?
http://www.w3schools.com/Dom/dom_nodes_traverse.asp
|