Document xml management