refactor xml parser into an object