eliminate trailing xml