China and Brazil have signed nearly 40 cooperation documents covering areas from trade to aerospace, with both sides hailing Chinese President Xi Jinping's state visit as a milestone for advancing bilateral relations.