我有一个最大 20 mb 的 xml:
<Neighborhood>
<Code LocationID='27767' NeighborhoodName='Broadway-Times Square' Latitude='40.7586' Longitude='-73.988152'/>
<Code LocationID='27767' NeighborhoodName='Midtown East' Latitude='40.755645' Longitude='-73.967428'/>
</Neighborhood>
我想阅读 xml 并创建一个类列表。
课程如下:
public class HotelNeighbourhood
{
public int LocationID { get; set; }
public string NeighborhoodName { get; set; }
public float Latitude { get; set; }
public float Longitude { get; set; }
}
我想以最快的方式创建一个列表。提前致谢。