Added function to generate XML data out of Item object.