Welcome Guest, Not a member yet? Register   Sign In
Unable to load the requested class: simplexml
#1

[eluser]Unknown[/eluser]
Hello, I think all are fine.

In learning framework i am facing many problem, from which maximum problem i can solve myself.

But now a problem giving me very botheration.

To read a xml file, my code which i have kept in controller


Code:
class Xml extends CI_Controller {

function index()
{
  //load the parser library
  $this->load->library('parser');

               $data['title'] = 'Parsing XML using Simplexml class of CodeIgniter';

               $data['products'] = $this->_getXML('new');

        $this->parser->parse('xml_view', $data);
}
    function _getXML($fname)
    {
                $filename = $fname.'.xml';
                
$xmlfile="http://www.acerdriversupdateutility.com/acer-travelmate-4060-drivers-utility.xml";
                $xmlRaw = file_get_contents($xmlfile);

                $this->load->library('simplexml');
                $xmlData = $this->simplexml->xml_parse($xmlRaw);

                foreach($xmlData['item'] as $row)
                {
   $result .= '<tr>';
   $result .= '<td>'.$row['XML_DIZ_INFO'].'</td>';
   $result .= '<td>'.$row['RoboSoft'].'</td>';
   $result .= '<td>'.$row['category'].'</td>';
   $result .= '<td>$ '.$row['price'].'</td>';
   $result .= '</tr>';
                }
                return $result;
      }
}


by running the page showing error

An Error Was Encountered
Unable to load the requested class: simplexml


what can i do here?


Messages In This Thread
Unable to load the requested class: simplexml - by El Forum - 03-13-2012, 08:54 PM
Unable to load the requested class: simplexml - by El Forum - 03-13-2012, 10:01 PM
Unable to load the requested class: simplexml - by El Forum - 03-13-2012, 10:17 PM
Unable to load the requested class: simplexml - by El Forum - 03-14-2012, 08:04 AM



Theme © iAndrew 2016 - Forum software by © MyBB