* HSI -0.2 pct, H-shares -0.6 pct, CSI300 +0.2 pct
* Rare earth firms down after China loses appeal at WTO
* China Unicom drops as earnings disappoint
* Melco Crown sinks on lacklustre results and Taiwan probe (Updates to midday)
By Grace Li
HONG KONG, Aug 8 (Reuters) - China shares eked out slim gains in choppy trade on Friday, buoyed by better-than-expected Chinese export growth that helped offset concern about the cooling housing market, while Hong Kong pared its early morning losses.
China's July exports surged 14.5 percent from a year earlier, nearly twice the expected increase, while imports posted a surprising fall of 1.6 percent, the General Administration of Customs said on Friday.
At midday, the CSI300 of the leading Shanghai and Shenzhen A-share listings rose 0.2 percent, while the Shanghai Composite Index was up 0.3 percent at 2,193.15 points. If the gains hold, Friday would be their first winning session in four.
On the week, the mainland indexes were up 0.1 and 0.4 percent, respectively.
The Hang Seng Index, at one point down 0.8 percent, was off 0.2 percent at 24,339.54 points at midday. The China Enterprises Index of the top Chinese listings in Hong Kong fell 0.6 percent. They are now down 0.8 and 1.5 percent this week, respectively.
Larry Jiang, chief strategist at Guotai Junan International Securities, said the fall in Hong Kong bourses coincided with a continuing slides in the U.S. market.
"Global funds are trying to take a breath after recent highs," Jiang said. "After the Hang Seng climbed to near 25,000 points, it has to consolidate a bit in the absence of any good news."
Soft survey results on China's services sector and some disappointing earnings also weighed on the markets, he added.
Rare earth producers suffered losses after China lost an appeal at the World Trade Organization in a case brought by the United States, the European Union and Japan to challenge China's restrictions on exports of rare earths.
Inner Mongolia BaoTou Steel Union and Aluminum Corp of China were top index drags in Shanghai, each shedding 4.2 percent.
Shares of the two companies surged earlier this week on l government approval to establish rare earth groups.
China Unicom slid 2.3 percent to a near 4-week low. The country's second-biggest wireless carrier on Thursday reported first-half net income lower than expectations, due to China's new value-added tax programme.
Shares in Macau casino operator Melco Crown fell 4.8 percent after it posted second-quarter earnings that missed consensus due to increased labour costs and sluggish growth in the world's biggest gambling hub.
The company also announced on Thursday night that a branch office in Taiwan has been indicted for alleged violations of local banking and foreign exchange laws.
Hong Kong-listed Chinese financial firms were broadly lower, with China's big four banks down between 0.5 and 1.1 percent.
"Investors were betting on their rebounds and are now taking profits after the gains. It's not that they truly believe there are fundamental changes in these companies," Jiang said. (Editing by Richard Borsuk)