You have two ways to go - One is to write such an utility yourself in Java/C++ whatever is your language of choice. Simply get the resultset and format it as an XML document. The advantages of using a home-grown utility is that it will give you better control over performance tuning, customization etc. It can be closely tied to your business processes. The downside however, is that you may be spending time and money in reinventing the wheel.
The second option is to investigate what XML support is offered by the vendor ie., Sybase. I'm sure they will have a plethora of options for XML support. Checkout their Enterprise Integration products. Vendor products always integrate better with other tools/services offered by them when compared with frameworks developed in-house.
Hope that helps!
------------------
Ajith Kallambella M. Sun Certified Programmer for the Java�2 Platform.
IBM Certified Developer - XML and Related Technologies, V1.