Hello, I am writting a little script that will read some XML. I have both DOM and SAX availble.
I am simply displaying a formatted list of all the nodes with each node being a hyperlink. I'm trying to figure out the best way to keep track of the path from the root to my current node. My XML doc will be deeply nested in some cases.
Here is an example:
<code><pre>
Root
+ Trunk
--+ Limb
--+ Limb
----+ Twig
----+ Twig
--+ Limb
+ Trunk
--+ Limb
--+ Limb
</pre></code>
Well I thought about making a global variable that would hold the location and then Every time I went one level down, I could append the current level to it. But this doesn't work too well when you have to go back up.
I can think of some very complex ways to do this, but I think there's probably an easy way that I haven't thought of.
Any Suggestions?
Matt Nuzum