In this paper, we study the cooperative network coding problem in relay-assisted wireless access networks. In such a network, each mobile station can choose different transmission schemes: directly transmitting to the base station, pure relaying by a relay station, or via cooperative network coding. We analyze the impact of the different schemes on the network throughput. We find the performance of pure relaying and cooperative network coding is affected by the selection of the relay station, making the relay selection problem inseparable from the cooperative network coding problem. We formulate the joint relay selection and resource allocation problem, and find this problem equivalent to the multiple 0/1 knapsack problem. To tackle this problem, we propose an efficient network-coding-based resource allocation algorithm, and define a coding gain metric. The simulation results show our algorithm significantly outperform other schemes. More importantly, the performance improvement by cooperative network coding is significantly affected by the number of relay stations and the distribution of mobile stations.