CodeIgniter Forums
XML parsing in Safari error - Printable Version

+- CodeIgniter Forums (
+-- Forum: Archived Discussions (
+--- Forum: Archived Development & Programming (
+--- Thread: XML parsing in Safari error (/thread-12291.html)

XML parsing in Safari error - El Forum - 10-13-2008

I've been working on this site for a week or so, and I just realized that it throws an error in Safari. Something about not being able to parse the XML.

Quote:A PHP Error was encountered

Severity: Warning

Message: SimpleXMLElement::__construct() [simplexmlelement.--construct]: Entity: line 2209: parser error : ParsePI: PI xml-stylesheet never end ...

Filename: libraries/doohicky.php

Line Number: 30

Here's some code from doohicky.php :

function HTTPRequest($url)
        $ch = curl_init();
          curl_setopt($ch, CURLOPT_TIMEOUT, 10); //times out after 10
          $data = curl_exec ($ch);
          curl_close ($ch);
          return $data;
    function GetXML($character,$realm)
        $xmlID = $this->HTTPRequest("doohicky.xml");
        $xml = new SimpleXMLElement($xmlID); // ** This is the error line **
        return $xml;

Anyone know what I need to do in order to make this work in Safari?