observation xml and json formatting and testing, xml nil cleanup