JSEnv live XPath visualizer
Anyway, I ended up excavating Firebug's highlight-a-node code to turn it into a tiny lib and then use that lib for beefing up Jesse Ruderman's jsenv bookmarklet with a live edit XPath field highlighting all matches in the page as you type:

It tells you what the expression matches in the title bar of the jsenv window, and signals some additional colour coded info via the XPath input field's border:
- red for illegal expressions,
- green for matching nodes,
- gray for 0 matched nodes,
- yellow for a string,
- blue for a number and
- magenta for a boolean value.
The ideal spot for this feature would probably be as an extra feature to toggle on and off in Firebug's HTML view -- to filter the view by, for instance. The more I think of it, the more useful this feature would be in that shape. I hope the Firebug Working Group is as open to additional community developers as it seems to aim for.
Anyway, here is the XPath jsenv; enjoy!











What's required to make this work? I'm using FF3b5 on XP. The XPath is working, the title bar shows the count, the input field changes color. But nothing is highlighted, and the arrow keys don't seem to work.