def METHOD_NAME(self, resource, filename):
    """Write xml format and read back"""
    logger = smtk.io.Logger.instance()
    path = os.path.join(smtk.testing.TEMP_DIR, filename)
    self.filenames.append(path)
    # Write as xml
    writer = smtk.io.AttributeWriter()
    err = writer.write(resource, path, logger)
    self.assertFalse(err, 'Failed to write attribute template1')
    # Read back
    test_resource = smtk.attribute.Resource.create()
    reader = smtk.io.AttributeReader()
    err = reader.read(test_resource, path, logger)
    self.assertFalse(err, 'Failed to read attribute template1')
    return test_resource