The voltage from the transformer will be ac, unlike the battery's dc voltage. So no, you can't directly use it. However, as you know many devices (cell phones, radios, the computer I'm using at the moment, ....) come with small power sources whose output is dc. These devices are transformers followed by rectifier bridge circuits to convert the ac to dc, although still with some ac ripples. It's possible that you could use one of these, but there are some potential serious problems.
Each such power supply has a nominal dc output voltage and a rated current. Unlike fancier power supplies, with regulated outputs, the voltage from these typically depends a good deal on the load resistance. So if you use one rated at say 4.5V and 100 mA on a device that only draws 20 mA, the voltage is likely to drift higher, perhaps causing damage. In other words, it is possible for the device to draw too many amps.
If your house is like mine, you may have a dozen or so if these power supplies lying around. I just grabbed one rated at 4.5 V and 300 mA and tested its voltage with very little load. It was 6.8 V, so you see what the problem can be. Even worse, the ac voltage was 14.5 V! So this supply would be likely to damage a small-load device.
Maybe you can use one of these power supplies if you're careful to match the nominal voltage and the approximate current rating. You should also pay attention to what your device is. Is it one which would be disrupted by ac ripple on the supply voltage? If so, extra precautions involving more circuit elements are needed to clean up the supply voltage. In some cases a very large capacitor in parallel with the supply will suffice. And of course, you do need to be careful about which lead is positive and which is negative.
Before tackling any of that, you'll need a little multimeter to check ac and dc volts and amps and a few variable resistors to mimic different loads. Ideally, but not as cheap, it would be good to have a little oscilliscope to see what the current pattern looks like.
(published on 02/13/12)