Iterate through xml elements with powershell
===

I have some xml files that have different elements. I would like to write some code either in c# or powershell that iterates through each element and gets the value. 
I would like it to be generic enough so that I can use it with other xml files. All xml files have the same format but the names of the elements defer.

Thanks a lot for your help.

    <root>
      <list>
           <FirstName>Abc</FirstName>
           <LastName>LT</LastName>
           <Occupatoin>Eng</Occupation>
           <BirthDate></BirthDate>
          ...
     </list>
    </root>
    
    ----------------------
    XML file 2
    
    <root>
      <Trainings>
           <Java>Ab</Java>
           <NET>b</NET>
           <SQL>c</SQL>
           <Powershell>d</Powershell>
          ...
     </Trainings>
    </root>