Fixing XML parser to make Java8 happy