title: HRESULT: 0xC00CE556 - Loading string to XML
body: <p>I'm trying to load a string that contains XML that is downloaded from SkyDrive.           </p>
  
  <pre><code>XmlDocument myXML = new XmlDocument();
  myXML.LoadXml(importXMLDocument);
  </code></pre>
  
  <p>When I call the above code I get the following error:</p>
  
  <blockquote>
    <p>Exception from HRESULT: 0xC00CE556</p>
  </blockquote>
  
  <p>This is the XML that I'm trying to convert from a string and load to the XML Document:</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;ArrayOfVehicle xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;
    &lt;vehicle&gt;
      &lt;VehicleName&gt;Tahoe&lt;/VehicleName&gt;
      &lt;VehicleYear&gt;2004&lt;/VehicleYear&gt;
      &lt;Odometer&gt;97742&lt;/Odometer&gt;
      &lt;LicensePlate&gt;&lt;/LicensePlate&gt;
      &lt;OilWeight&gt;5w-30&lt;/OilWeight&gt;
      &lt;OilBrand&gt;&lt;/OilBrand&gt;
      &lt;OilQuantity&gt;6&lt;/OilQuantity&gt;
      &lt;OilFilterModelNumber&gt;&lt;/OilFilterModelNumber&gt;
      &lt;AirFilterModelNumber&gt;&lt;/AirFilterModelNumber&gt;
      &lt;TirePressureAll&gt;0&lt;/TirePressureAll&gt;
      &lt;TirePressureFrontRight&gt;0&lt;/TirePressureFrontRight&gt;
      &lt;TirePressureFrontLeft&gt;0&lt;/TirePressureFrontLeft&gt;
      &lt;TirePressureBackRight&gt;0&lt;/TirePressureBackRight&gt;
      &lt;TirePressureBackLeft&gt;0&lt;/TirePressureBackLeft&gt;
      &lt;OilChangedOdometer&gt;97742&lt;/OilChangedOdometer&gt;
      &lt;OilChangedDate&gt;2012-05-04T19:53:53.358-06:00&lt;/OilChangedDate&gt;
      &lt;NextOilChangeDate&gt;2012-08-04T19:53:53.358-06:00&lt;/NextOilChangeDate&gt;
      &lt;NextOilChangeOdometer&gt;100742&lt;/NextOilChangeOdometer&gt;
      &lt;TiresRotated&gt;false&lt;/TiresRotated&gt;
      &lt;AirFilterChanged&gt;false&lt;/AirFilterChanged&gt;
      &lt;SettingDistance&gt;3000&lt;/SettingDistance&gt;
      &lt;SettingMonths&gt;3&lt;/SettingMonths&gt;
      &lt;SettingReminder&gt;true&lt;/SettingReminder&gt;
      &lt;SettingLiveTile&gt;true&lt;/SettingLiveTile&gt;
      &lt;IsTrial&gt;true&lt;/IsTrial&gt;
      &lt;VehicleId&gt;2&lt;/VehicleId&gt;
    &lt;/vehicle&gt;
    &lt;vehicle&gt;
      &lt;VehicleName&gt;Mazda3&lt;/VehicleName&gt;
      &lt;VehicleYear&gt;2011&lt;/VehicleYear&gt;
      &lt;Odometer&gt;21504&lt;/Odometer&gt;
      &lt;LicensePlate&gt;abcdefg&lt;/LicensePlate&gt;
      &lt;OilWeight&gt;0w-20&lt;/OilWeight&gt;
      &lt;OilBrand&gt;&lt;/OilBrand&gt;
      &lt;OilQuantity&gt;0&lt;/OilQuantity&gt;
      &lt;OilFilterModelNumber&gt;&lt;/OilFilterModelNumber&gt;
      &lt;AirFilterModelNumber&gt;&lt;/AirFilterModelNumber&gt;
      &lt;TirePressureAll&gt;0&lt;/TirePressureAll&gt;
      &lt;TirePressureFrontRight&gt;0&lt;/TirePressureFrontRight&gt;
      &lt;TirePressureFrontLeft&gt;0&lt;/TirePressureFrontLeft&gt;
      &lt;TirePressureBackRight&gt;0&lt;/TirePressureBackRight&gt;
      &lt;TirePressureBackLeft&gt;0&lt;/TirePressureBackLeft&gt;
      &lt;OilChangedOdometer&gt;21504&lt;/OilChangedOdometer&gt;
      &lt;OilChangedDate&gt;2012-09-14T18:05:02.298-06:00&lt;/OilChangedDate&gt;
      &lt;NextOilChangeDate&gt;2013-02-14T18:05:02.298-07:00&lt;/NextOilChangeDate&gt;
      &lt;NextOilChangeOdometer&gt;26504&lt;/NextOilChangeOdometer&gt;
      &lt;TiresRotated&gt;false&lt;/TiresRotated&gt;
      &lt;AirFilterChanged&gt;false&lt;/AirFilterChanged&gt;
      &lt;OilChangeCost&gt;64.75&lt;/OilChangeCost&gt;
      &lt;OilChangeNotes&gt;need new tires - $500+&lt;/OilChangeNotes&gt;
      &lt;SettingDistance&gt;5000&lt;/SettingDistance&gt;
      &lt;SettingMonths&gt;5&lt;/SettingMonths&gt;
      &lt;SettingReminder&gt;true&lt;/SettingReminder&gt;
      &lt;SettingLiveTile&gt;true&lt;/SettingLiveTile&gt;
      &lt;IsTrial&gt;false&lt;/IsTrial&gt;
      &lt;VehicleId&gt;2&lt;/VehicleId&gt;
    &lt;/vehicle&gt;
  &lt;/ArrayOfVehicle&gt;
  </code></pre>
  
  <p>Update:</p>
  
  <p>This is the code where I download the XML file from SkyDrive (using the API):
  It was confirmed last night that this process when the file is being downloaded from SKYDrive that an extra "?" is being add.  The following is my entire function that does the downloading and the "LoadXml" call.  Any help is appreciated.</p>
  
  <pre><code>private async void readFileInfo(string folderId)
  {
       LiveOperationResult operationResultFile =
       await client.GetAsync(folderId + "/files");
  
       dynamic resultFile = operationResultFile.Result;
       IDictionary&lt;string, object&gt; fileData = (IDictionary&lt;string, object&gt;)resultFile;
       List&lt;object&gt; files = (List&lt;object&gt;)fileData["data"];
  
       foreach (object item in files)
       {
            IDictionary&lt;string, object&gt; file = (IDictionary&lt;string, object&gt;)item;
  
            if (file["name"].ToString() == "ocha.txt")
            {
                 LiveDownloadOperationResult DLFile =
                 await client.BackgroundDownloadAsync(file["source"].ToString();
  
  
                  var stream = await DLFile.GetRandomAccessStreamAsync();
                  var readStream = stream.GetInputStreamAt(0);
  
  
                  DataReader reader = new DataReader(readStream);
                  uint fileLength = await reader.LoadAsync((uint)stream.Size);
  
  
                  string content = reader.ReadString(fileLength);
  
  
                  XmlDocument myXML = new XmlDocument();
                  myXML.LoadXml(content.ToString());
  
  
                  VM.importVehicles(content);
  
  
                  break;
              }
        }
  }
  </code></pre>