Building Information Modeling (BIM), as an effective means to improve the efficiency of building design and construction, is gradually receiving widespread attention. However, in the railway industry, BIM is still in its infancy in terms of infrastructure data transmission, and has not yet formed a general data exchange mode that can fully meet the full life-cycle data transmission needs of railway infrastructure. According to the requirement of data sharing in the full life-cycle of railway infrastructure, this paper proposes a railway infrastructure data exchange model. By referring to the data modeling methods of Industry Foundation Classes (IFC) and Railway Markup Language (RailML), this paper proposes a metadata definition method of railway infrastructure and a method of automatically generating data exchange schema based on the data exchange model. Application results show that the proposed data exchange schema can provide an efficient and convenient way for data sharing in the full life-cycle of railway infrastructure.