Obama said the U.S. would co-operate with China where it could, but clearly marked out the clash of values.