Powershell Calculate number of lines using xml attributes values : I have one xml file say like below,

    <data>
         <fields>
              <artifacts>
                  <artifact AL="68" CL="4" DL="0">
                  </artifact>
                  <artifact AL="86" CL="2" DL="1">
                  </artifact>
                  <artifact AL="34" CL="7" DL="0">
                  </artifact>
                  <artifact AL="18" CL="1" DL="3">
                  </artifact>
              </artifacts>
              <dart>
                  <bug>
                     <fields part="Major">Yes</fields>
                     <fields part="Major">Yes</fields>
                     <fields part="Major">No</fields>
                  </bug>
              </dart>
         </fields>
    </data>

i want powershell read xml files and gives total lines (TL = AL + DL + CL) calculating each xml atrifact tags and list defects only it is Major equals Yes

Thanks,
sundarm