debug tool hilites markup on page: how?
I have a page of generated markup that contains arbitrary portions blocked like so:
<span id="XXX">...lots of markup...</span><!--XXX--!>
I want to be able to take whatever markup is inside the span (and it could be anything), and visually highlight it on the page, or pull it out and display in a pop up.
Whether I get source markup or the generated output from markup doesn't matter to me.
Whether I use spans or divs or comments doesn't matter to me.
What I do not know is if I can locate the start span, and grab everything up to the end span.
I have never "walked a DOM tree" or any such-like thing.
What am I looking for (functions, helpers, classes, tools)?
Is this possible or am I on a fool's errand?
I am certain I can find a span given the id. Where do I go from there ?!!
Thanks for any ideas
Here we are: https://code.google.com/p/rangy/
No doubt Ext does all this. But it turned out this was easy, and I was spared building a project, struggling with Cmd, and releasing a megabyte file for two-bit functionality.