XML handling optimized

The xml has to be less formatted
Optimizing the number of iterations