title: "Comment not terminated" XML parsing error in Box API response
body: <p>For months I've been running the "Box Rest Client" lib by Angela R that employs the following code to parse curl responses from the box API:</p>
  
  <pre><code>$xml = simplexml_load_string($res);
  </code></pre>
  
  <p>Today, after the code loops through dozens of request/responses I generate this following error:</p>
  
  <blockquote>
    <p>ErrorException [ Warning ]: simplexml_load_string(): Entity: line 9:
    parser error : Comment not terminated  
  </blockquote>
  
  <p>This happened in 2 straight attempts to run the code - and now seems to have gone away without any changes to anything. </p>
  
  <p>Interested if anyone knows what is up with that?</p>
  
  <p>I have put a catch for this case if its useful to anyone using this lib (for the next month or so before its deprecated by box api 2.0)</p>
  
  <pre><code>private function parse_result($res) {
   try {
        $xml = simplexml_load_string($res);
    $json = json_encode($xml);
    $array = json_decode($json,TRUE);     
    return $array;
   } catch (Exception $e){    
      $error = 'xml parsing error: '. $e-&gt;getMessage(). "&lt;br&gt;";
    return array('status' =&gt; $error );
   }
  }
  </code></pre>