This allows nesting of any depth and displays beautifully in a
tree-structured browser. [I shall be releasing JUMBO2 very shortly - when
SAX is finalised - and this will be one of the examples to show an
essentially non-textual application of XML.]
[I have added whitespace to the above example for human benefit. Exercise:
If you are new to XML, how would you decide whether the whitespace was
'ignorable'? :-)]
Note that I dare not venture further than this because taxonomies are much
more complex than this - usually dynamic and hence requiring attention to
renaming, equivalences, the possibility of multiple parents, etc. Much the
same problems as with orgCharts :-). But if you have a fixed taxonomy, XML
is wonderful. try doing the above with a relational data and asking
non-experts to create the input, whereas I suspect any scientist could work
with the above almost without thinking.
Why did I include the 'data' in the TITLE attribute rather than content?
Mainly because I had a simple display routine that picked up TITLE
attributes rather than content attributes :-). If I redid it now I might
move things to element content.
HTH
P.
Peter Murray-Rust, Director Virtual School of Molecular Sciences, domestic
net connection
VSMS http://www.nottingham.ac.uk/vsms, Virtual Hyperglossary
http://www.venus.co.uk/vhg