Saving a list of numbers in XML

siirderyasi

New Member
I'm making a program to book out equipment from a studio. I'm saving everything to XML (I will eventually have it synchronising online), and I can save everything except an ArrayList of Integers. These Integers are of the unique ID of the Equipment that is being used.My question, how can I store and retrieve them in the XML? I am fine with saving them but it's the reading of them that i'm having trouble with, this is an excerpt of saving the equipment:\[code\]for(Integer i : b.getEquipment()){ Element equipmentID = doc.createElement("EquipmentID"); equipmentID.appendChild(doc.createTextNode(i.toString())); theEquipment.appendChild(equipmentID); }\[/code\]And in the XML, this looks like.. (From < Equipment >)\[code\]<Booking><Person>1</Person><Project>Current</Project><Equipment> <EquipmentID>2</EquipmentID></Equipment><DateOut>09/09 11:24:15</DateOut></Booking>\[/code\]My trouble now, is how do I read in the < EquipmentID > tags?There could be lots of < EquipmentID > tags as lot's of Equipment could be booked out.Thanks.
 
Back
Top