Mostly finished toXml method for most fragments