read XML using LINQ
<p>I am newbie to LINQ. I am trying to read the following node and element values from XML using LINQ. </p>

<p>DATA -- msgid and msgtime
PTP -- percentage
CONT1 -- get "url" value if the "type" = "RIGHT"</p>

<p>Please let me know.</p>

<pre><code>&lt;DATA msgid="02123" msgtime="2008-02-29 15:30:02.123"&gt;
  &lt;PTP number="67" pert="READ" percentage="95" pertime="2008-02-29 15:30:02.123"&gt;
    &lt;Images&gt;
      &lt;Image view="w1" type="IMAGE" percentage="85" distance="0" url="00002_tyd.jpg" /&gt;
    &lt;/Images&gt;
  &lt;/PTP&gt;
  &lt;CHAS1 sequence="1" number="58019" percentage="95" pertime="2008-02-29 15:30:02.123"&gt;
    &lt;Images&gt;
      &lt;Image view="c1" type="WRONG" percentage="85" url="00002_ssj.jpg" /&gt;
      &lt;Image view="c2" type="RIGHT" percentage="85" url="00003_ssj.jpg" /&gt;
    &lt;/Images&gt;
    &lt;CONT1 number="58011" percentage="95" pertime="2008-02-29 15:30:02.123"&gt;
      &lt;Images&gt;
        &lt;Image view="c1" type="WRONG" percentage="85" url="00002_csj.jpg" /&gt;
        &lt;Image view="c2" type="RIGHT" percentage="85" url="00003_csj.jpg" /&gt;
      &lt;/Images&gt;
    &lt;/CONT1&gt;
  &lt;/CHAS1&gt;
&lt;/DATA&gt;
</code></pre>
