Added builder code to add the code XPath state.