I gave a talk at SQL Saturday 109
about how we have functionality in our application that captures the top 400 SQL statements by total elapsed time, including the showplan xml, and builds a zip file of interlinked html pages and returns the zip file to the user through the browser. For each showplan xml string, we build a DOM and run some xPath expressions across the DOM, to pull out useful information and to build a tabular representation of the query plan, showing useful information that's dependent on the type of RelOp node. (I'm repeating the talk for the SQL PASS Virtual Performance Chapter
on 5/24. I got the idea of using a tabular display for the query plans from blog posts by Pinal Dave and Michael Coles. They used xQuery imbedded in SQL, but doing it in the app server is much more efficient, especially given the # of plans that I am capturing and the conditional evaluation of xPath expressions. (Show the build and probe tables for a hash match, sort columns, etc.)
It seems like your code could be used to do some (or all) of that, with the ability to conditionally run xPath expressions against the showplan xml being very useful for anyone that wanted to do a detailed analysis of an arbitrary query plan.