Refactoring 01 - Change writer code to use XPATH