Change Trait by Class for xml2array functions

Signed-off-by: Fabien Crassat <fabien@crassat.com>