refatory for parse portal xml