Integrate with database; correct getFullXpath