refactor xml parser implementation to Iteratable