Casting simplexml-object=>string was missing