title: Parse an xml document when namespace is no-longer available
body: <p>I have a number rather large, complex xml documents that I need to loop through. An xmlns is defined at the top of the document however the url this points to is no longer available.</p>
  
  <p>What's the best way to parse the file to get the important data from it using C#?</p>
  
  <p>I tried to load it into a Dataset but would occasionally receive the errors:
  The table (endpoint) cannot be the child table to itself in nested relations.
  or
  Cannot add a SimpleContent column to a table containing element columns or nested relations.</p>
  
  <p>XPath was my next port of call but I had problems because of the lack of namespace.</p>
  
  <p>I suspect this is seriously limiting my options, but does anyone have any suggestions?</p>
  
  <p>Snippet of the XML document:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;cdr:cdr_set xmlns:cdr="http://www.naturalconvergence.com/schema/cdr/v3/cdr"&gt;
  
  &lt;!--  Copyright (c) 2001-2009, all rights reserved  --&gt;
  
  &lt;cdr:cdr xmlns:cdr="http://www.naturalconvergence.com/schema/cdr/v3/cdr"&gt;
    &lt;cdr:call_id&gt;2040-1247062136726-5485131&lt;/cdr:call_id&gt;
    &lt;cdr:cdr_id&gt;1&lt;/cdr:cdr_id&gt;
    &lt;cdr:status&gt;Normal&lt;/cdr:status&gt;
    &lt;cdr:responsibility&gt;
      &lt;cdr:tenant id="17"&gt;
        &lt;cdr:name&gt;SpiriTel plc&lt;/cdr:name&gt;
      &lt;/cdr:tenant&gt;
      &lt;cdr:site id="45"&gt;
        &lt;cdr:name&gt;KWS&lt;/cdr:name&gt;
        &lt;cdr:time_zone&gt;GB&lt;/cdr:time_zone&gt;
      &lt;/cdr:site&gt;
    &lt;/cdr:responsibility&gt;
    &lt;cdr:originator type="sipGateway"&gt;
      &lt;cdr:sipGateway id="3"&gt;
        &lt;cdr:name&gt;Audiocodes-91&lt;/cdr:name&gt;
      &lt;/cdr:sipGateway&gt;
    &lt;/cdr:originator&gt;
    &lt;cdr:terminator type="group"&gt;
      &lt;cdr:group&gt;
        &lt;cdr:tenant id="17"&gt;
          &lt;cdr:name&gt;SpiriTel plc&lt;/cdr:name&gt;
        &lt;/cdr:tenant&gt;
        &lt;cdr:type&gt;Broadcast&lt;/cdr:type&gt;
        &lt;cdr:extension&gt;6024&lt;/cdr:extension&gt;
        &lt;cdr:name&gt;OLD PMS DDIS DO NOT USE&lt;/cdr:name&gt;
      &lt;/cdr:group&gt;
    &lt;/cdr:terminator&gt;
    &lt;cdr:initiation&gt;Dialed&lt;/cdr:initiation&gt;
    &lt;cdr:calling_number&gt;02087893850&lt;/cdr:calling_number&gt;
    &lt;cdr:dialed_number&gt;01942760142&lt;/cdr:dialed_number&gt;
    &lt;cdr:target&gt;6024&lt;/cdr:target&gt;
    &lt;cdr:direction&gt;Inbound&lt;/cdr:direction&gt;
    &lt;cdr:disposition&gt;No Answer&lt;/cdr:disposition&gt;
    &lt;cdr:timezone&gt;GB&lt;/cdr:timezone&gt;
    &lt;cdr:origination_timestamp&gt;2009-07-08T15:08:56.727+01:00&lt;/cdr:origination_timestamp&gt;
    &lt;cdr:release_timestamp&gt;2009-07-08T15:09:26.493+01:00&lt;/cdr:release_timestamp&gt;
    &lt;cdr:release_cause&gt;Normal Clearing&lt;/cdr:release_cause&gt;
    &lt;cdr:call_duration&gt;PT29S&lt;/cdr:call_duration&gt;
    &lt;cdr:redirected&gt;false&lt;/cdr:redirected&gt;
    &lt;cdr:conference&gt;false&lt;/cdr:conference&gt;
    &lt;cdr:transferred&gt;false&lt;/cdr:transferred&gt;
    &lt;cdr:estimated&gt;false&lt;/cdr:estimated&gt;
    &lt;cdr:interim&gt;false&lt;/cdr:interim&gt;
    &lt;cdr:segments&gt;
      &lt;cdr:segment&gt;
        &lt;cdr:originationTimestamp&gt;2009-07-08T15:08:56.727+01:00&lt;/cdr:originationTimestamp&gt;
        &lt;cdr:initiation&gt;Dialed&lt;/cdr:initiation&gt;
        &lt;cdr:call_id&gt;2040-1247062136726-5485131&lt;/cdr:call_id&gt;
        &lt;cdr:originator type="sipGateway"&gt;
          &lt;cdr:sipGateway id="3"&gt;
            &lt;cdr:name&gt;Audiocodes-91&lt;/cdr:name&gt;
          &lt;/cdr:sipGateway&gt;
        &lt;/cdr:originator&gt;
        &lt;cdr:termination_attempt&gt;
          &lt;cdr:termination_timestamp&gt;2009-07-08T15:08:56.728+01:00&lt;/cdr:termination_timestamp&gt;
          &lt;cdr:terminator type="group"&gt;
            &lt;cdr:group&gt;
              &lt;cdr:tenant id="17"&gt;
                &lt;cdr:name&gt;SpiriTel plc&lt;/cdr:name&gt;
              &lt;/cdr:tenant&gt;
              &lt;cdr:type&gt;Broadcast&lt;/cdr:type&gt;
              &lt;cdr:extension&gt;6024&lt;/cdr:extension&gt;
              &lt;cdr:name&gt;OLD PMS DDIS DO NOT USE&lt;/cdr:name&gt;
            &lt;/cdr:group&gt;
          &lt;/cdr:terminator&gt;
          &lt;cdr:provided_address&gt;01942760142&lt;/cdr:provided_address&gt;
          &lt;cdr:direction&gt;Inbound&lt;/cdr:direction&gt;
          &lt;cdr:disposition&gt;No Answer&lt;/cdr:disposition&gt;
        &lt;/cdr:termination_attempt&gt;
      &lt;/cdr:segment&gt;
    &lt;/cdr:segments&gt;
  &lt;/cdr:cdr&gt;
  
  ...
  
  &lt;/cdr:cdr_set&gt;
  </code></pre>
  
  <p>Each  entry is essentially the same but there are sometimes differences such as some of the fields may be missing, if they aren't required.</p>