I'm trying to extract the coverage data from XML file generated by NCover using C#. The XML file looks something like this:
<namespace n="namespace" t="11" fp="11" u="0" c="100">
<class n="foo" t="11" fp="11" u="0" c="100">
<method n="foo1" t="1" fp="1" u="0" c="100" l="16" />
<method n="foo2" t="1" fp="1" u="0" c="100" l="13" />
</class>
Right now I'm using pattern matching for when there's a value > 0 for c and then looking behind to retrieve the method name, but its really cumbersome. Is there a better way to do this?