Refactor XML XPath deserializer header/body handling.