I'm trying to create an array list out of an XML file.
In fact, I need to read a user input(which would be one of the elements) and return a certain node value.Here's the XML file:
<?xml version="1.0" ?> 
- <types>
- <type id="Nourriture" taxe="0.1">
  <element>pomme</element> 
  <element>fraise</element> 
  <element>fromage</element> 
  <element>viande rouge</element> 
  </type>
- <type id="Matiere Premiere" taxe="0.2">
  <element>fer</element> 
  <element>polypropylene</element> 
  </type>
- <type id="Element Solide" taxe="0.3">
  <element>voiture</element> 
  <element>planche surf</element> 
  <element>pistolet</element> 
  </type>
  </types>
What I'm asked for is to see element, then depending on that, I need to return the "taxe" value.
I literally tried most things to do that, until I noticed my only solution is putting them inside an array /array list as follows:
`ArrayList  arraylistobject = new ArrayList();
 arraylistobject.add(....);` 
etc... Any thoughts on how to do this?