This significantly improves performance and reduces memory consumption
when parsing XML files. On a test with 124 JUnit files from a CE build,
there was about a 4x reduction in processing time.
Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/54068