Minor fixes

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

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