[api] move the matcher out of activexml

It has no coverage outside of test cases