I have a lesser action camera, an Ego 727. (And one of these days, I'll probably get one of the GoPro models.)
However, I have a top-shelf mount for it, a combination of a Mini Cardellini clamp and a Manfotto 494 ball head. This particular combination is sold by Filmtools -- Cardellini 494 - The Mini Cardellini Camera & Monitor Mount Filmtools
-- but you can probably get the two parts cheaper.
I typically mount this on the left crashbar -- see attached pic -- although you can use this mount all over the bike. On the crashbar mount, for an example of what you end up with at this height -- the perspective -- see this clip I saved on Vimeo:
The Cardellini is a machined work of art, and with protective rubber inside the jaws. And it absolutely stays put, as does the Manfrotto.
There are less expensive ways to go, of course, but, ya know, you generally you get what you pay for. RAM makes a clamping mount, the Tough-Claw: RAM Small Tough-Claw? with 1" Diameter Rubber Ball
. Pedco makes a mount that some bike-on-camera review sites use:
HogTail makes some mounts that you may like, including some specifically with GoPros in mind. There's one designed for the Vic fork tube: HogTag Collar - Victory / Triumph Models | HogTag Collar
. I think that's too close to the range of fork-tube movement, and he has been working on one (at my request, actually) that can mount way up at the top. They also make the HogJaw, which can be positioned in all sorts of ways: Hog Jaw Articulating Mount by HogTag Collar | HogTag Collar
If you do want a handlebar amount, you might be interested in something like the Adaptiv anti-vibration mount:
. I doubt that this would clear the fairing enough on an XC/XCT; it might be better suited for an XR.
Keep in mind that even though the crashbars, etc., are sprung weight -- that is, it's not as if you mount this stuff to an (unsprung) axle -- you still get some vibration. This is particularly evident when you're in the process of winding up a big twin. And this will be worse on the handlebars, which are not as rigid as the crashbars (and I have no idea how well the Adaptiv mount actually works).
You can avoid this problem by keeping a steady or decreasing speed most of the time. Or by mounting an action cam to your helmet, chest, etc., i.e., using the body as a shock-absorbing mechanism. Me, I prefer a fixed mount, on the bike, as compared to a body mount. And I prefer something that doesn't move with the handlebars or fairing... which is why I mostly pick on the crashbar. But to each his own.
Hope this gives you some ideas...