XElement return node value

Posted by theDawckta on Stack Overflow See other posts from Stack Overflow or by theDawckta
Published on 2011-03-18T23:54:29Z Indexed on 2011/03/19 0:09 UTC
Read the original article Hit count: 129

Filed under:
|
|

I have an XElement that looks like this;

    <VideoFiles>
  <VideoFileInfo>
    <VideoType>1000</VideoType> 
    <FormatCode>1000</FormatCode> 
    <Url>http://www.idontwantthisvalue.com</Url> 
  </VideoFileInfo>
  <VideoFileInfo>
    <VideoType>WMVOriginal</VideoType> 
    <FormatCode>1004</FormatCode> 
    <Url>http://www.iwanthitsvalue.com</Url> 
  </VideoFile>

I need to grab the value that has a sibling with a value of 1004.

Can anyone help on this?

© Stack Overflow or respective owner

Related posts about Xml

Related posts about LINQ