in reply to Keeping track of html tags

Matt, it looks like you've got a pretty good idea for a technique to use. My advice to you is to make up some sample data to parse (to populate a small HoA), and then take a whack at implementing that algorithm you have in mind. If this small sample program doesn't work as you expect, and you've tried figuring it out but are then still stuck, you can then post what you've got at that point and you'll likely get some help.

Also remember, the more you can shave down your sample code to be a *minimal* but clear and complete (though broken) program, the easier it will be for some monk to come along and point out the corrections you might make.

Good luck! Sounds like you've got some fun stuff to work on! :)