XC usually favors flat bars because they alloy for a bigger drop from saddle to bar height. Neither kind is better. The correct one is whichever suites your needs. Flats besides giving you a lower height based on your existing stem and spacer height also tend to be shorter allowing for better clearince and sharper control in very tight single tracks common to many XC courses. Typically they run around 22 to 23 inches. Risers usually give a more upright position and more sweep which puts you a bit further back and are wider making steering slower but more stable and predictable. They can typically run around 24 to 28 inches. Whichever you choose it should be whatever has the width you prefer and puts your bar height in the posision you want with whatever stem or spacer setup you choose.
My bikes for example are a Spider for XC racing with a flat bar with a 1.5" drop in saddle to bar height. I use a 5 degree rise Thomson stem with two 5mm spacers. If were to use a riser my bars would end up being too high for practical XC racing use since they should typically be around 1" to 3" lower than the saddle. So you see there is very low spacer and stem height so using a flat is pretty much the only way I can get the drop I need.
On my other bike, a Swithblade trailbike I like to keep the bars somewhat level or slightly taller than the saddle. It also has a 5 degree stem and two 5mm spacers so the only way to bring the bars up is to use a riser. I could opt for a taller stem and more spacers but I hate using too many spacers and tall stems tend to run shorter so I avoid them. In this case a riser is the practical solution. I also like the fact that I want a longer bar on the Switchblade.
i see, thank you for the very helpful post. i think i might go for the flat bar over the riser. also, i wasnt aware of the ideal saddle heights for different types of riding, i just kinda guessed where it should be. learn somethin new every day.