sembra che si sia una soluzione più elegante..
ma non testata.

http://stackoverflow.com/questions/1...with-simplexml