put xml into Array
问题 I have an xml file, and I need to be able to sort it in either a list or an array The XML: <Restaurant> <name>test</name> <location>test</location> </Restaurant> <Restaurant> <name>test2</name> <location>test2</location> </Restaurant> All the Restaurants will have the same number of fields and the same names for the fields, but the number of <Restaurant></Restaurant> in a given xml file is unknown. In other words, I need an array or list and be able to do this: String name = restaurantArray[0