Hierarchical Navigation and XML

9 Sep 2004 - 2:53pm
11 years ago
2 replies
1004 reads
Noreen Whysel

I am working on a project which demands a highly hierarchical navigation
scheme (essentially an animal taxonomy: class, order, family, etc) and was
wondering about using XML to create and manipulate the way the interface is
presented. I like the idea of using attributes to control the way certain
nodes are displayed in the navigation (probably would require SVG?) and
would also like to be able to turn off or select certain portions of the
taxonomy to control what is displayed on particular pages. (Each taxon is
a page or record of the site and the "family tree" will be the primary

Does anyone have information on using XML to display hierarchical
navigation. Any recommended resources that don't require a PhD in IT to
understand? I've taken classes on XML and have some background in how it
all works, but my brain & tired eyes like plain English resources!


Noreen Whysel

Don’t just search. Find. Check out the new MSN Search!


9 Sep 2004 - 7:06pm

Noreen Whysel:
> Does anyone have information on using XML to display hierarchical
> navigation...

There are lots of examples of HTML+CSS driven menus around that can consume
XML. The challenge is not XML. You may not even want the overhead of XML
parsing if your site is self-contained, as you can use plain text to feed
the nav.

The interesting part is the rules engine that generates the specific
nav/menu configuration per given page. You'll have interdependent IDs for
Page, Parent/Child, MenuOrder, MenuLabel, etc. Some kind of engine has to
determine what gets shown/hidden and in what order they appear.

If your pages are dynamically generated you already have an app server,
middleware or CGI that can configure what gets returned to the browser, so
that would be the appropriate place to stuff the rules.

If you use XML, though, then you should consider XSL, which can transform
XML into other formats. XSL can apply rules based on templates to rewrite
the file to be consumed by your menu, determining what menu/item/subitem
gets to be shown/hidden and with what presentation attributes. (Think of XSL
as the SQL for XML.) XSL templates would allow you to change content,
configuration and style of menus without having to have programmers fiddle
with CGIs or server code.

Nullius in Verba

10 Sep 2004 - 12:18pm
Clay Newton

> Does anyone have information on using XML to display hierarchical
> navigation.

The more recent browsers from MS and Mozilla support using Javascript
to process the XML DOM. Using DHTML and XML much that you would be
able to do w/ SVG without requiring any addition browser plugins.

There is a really informative example of this on Apple's Developer
Connection site:

This functionality works equally well in IE 6 and Mozilla based browsers.

When it comes to heirarchical menus, there are a number of resources
on the web for building these using DHTML. Some examples:

Best of luck! Sounds like a fun project!

Syndicate content Get the feed