Euro,
The temazepam would be a better choice for sleeping as it's a longer acting benzo, meaning by design the temazepam has a longer half life, so it's effects should last longer, of course that all depends on your tolerance, and benzo's, as nsauce stated, are highly addictive and not just psychologically, but the body can develop a tolerance very quickly and you would need more of it to get the same result. The long length of time temazepam stays in your system is why it is usually prescribed for insomnia and less for anxiety, but as with most benzo's Doctors tend to use them interchangeably for anxiety and sleep. The thing with the resortil for me anyway is that it takes a very long time for me to fall asleep in it, but once asleep, I tend to stay asleep on it.
With xanax, it is usually perscribed for anxiety as it's a much faster acting meds but tends to exit your blood steam fairly quickly, but I'm imagining that they made the xr (extended release) so that while it will still have a quick effect to bring the anxiety down, the xr would allow the rest to release slowly over time allowing it to work for longer. Because it is the XR I wouldn't not recommend taking it along with the temazepam as you would have 2 very strong benzo's in your system for a long time, and while the worst that would probably happen would be sleep sleep and more sleep, I wouldn't do them together unless advised by your Dr. If the Xanax was the instant release then I'd say it would be much less of a concern as the IR would help you fall asleep quicker and the temazepam would be there to maintain your sleep. Either one is good to use for your daily anxiety, but the Xanax to me has a more calming, relaxing, anti anxiety effect, where as for anxiety I don't find temazepam to be very effective.
Just becareful with the power of the almighty benzo, as the body builds up that tolerance very quickly and physical addiction to them can happen without warning and 2 of the most dangerous physical addictions to over come are alcohol and benzo's. So please becareful, as always talk with your Dr if the meds aren't working for you the way they are prescribed as you don't want to risk that addiction because you had to take more, double up, or take against the Dr's order. Good luck and be safe.