linq to xml and namespaces

Posted by scott on Stack Overflow See other posts from Stack Overflow or by scott
Published on 2010-05-01T18:24:27Z Indexed on 2010/05/01 18:27 UTC
Read the original article Hit count: 223

Filed under:
|
|

I'm always so excited to get a chance to use linq to xml and then I run into the same PITA issue with namespaces. Not sure what is wrong with me but I can never quite grok what is going on. Basically I just need to get the value of the responseCode element and so far I have had no luck :(

<?xml version="1.0" encoding="IBM437"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
 <soapenv:Body>
   <ns1:ActionResponse xmlns:ns1="http://cbsv.ssa.gov/ws/datatype">
     <ns1:responseCode>0000</ns1:responseCode>
     <ns1:responseDescription>Successful</ns1:responseDescription>
   </ns1:ActionResponse>
 </soapenv:Body>
</soapenv:Envelope>

© Stack Overflow or respective owner

Related posts about linq-to-xml

Related posts about namespaces