Use more standard prototypical inheritance for toXml methods