use 2 spaces identation in xml output
prefer c++11 range based loops for readability