How would a person take any guitar fx pedal and use an XLR out connector to make it a DI? It would be great to be able to switch between 1/4" out and XLR out. Would a transformer be needed?
you can do it with a transformer or an opamp (or other ways, those two are probably the easiest). opamps perform very well and are typically cheaper. there is info on the web about this but you'll have to google around and experiment. you might have luck searching "balanced line driver". basically it involves making a unity gain buffer followed by an inverting unity gain buffer. this might help you get started: http://sound.westhost.com/project51.htm (http://sound.westhost.com/project51.htm)
note that if you use an opamp, you won't be able to lift the ground (not often important for most).
texas instrument, analog devices and THAT corp all make 1-chip line drivers for around $6 - 8 each, as well.
in most cases, you should just be able to tap the line driver off the regular 1/4" output.
Weber sell a little balun transformer (https://taweber.powweb.com/store/magnetic.htm) you can use to convert an output to a DI signal.
You don't actually have to look too far:
http://www.madbeanpedals.com/forum/index.php?topic=14276.0
I used this board in my Random Stranger Bass Station, and it makes having a DI as easy as you could want.
Daaammmnnnn that's awesome!!!