Added function documentation and sample xml