Yii Framework Forum: simpleXML - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

simpleXML Rate Topic: -----

#1 User is offline   habatone 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 97
  • Joined: 02-February 12

Posted 19 February 2012 - 12:07 PM

I'm trying to parse some xml by using simplexml_load_file, do I need a simpleXML extension for Yii to do this?
0

#2 User is offline   andy_s 

  • Random Member Title
  • Yii
  • Group: Moderators
  • Posts: 1,526
  • Joined: 22-June 09
  • Location:Russia, Kostroma

Posted 19 February 2012 - 12:26 PM

SimpleXML is a PHP extension, you don't need anything else to parse xml files, even Yii... :)
0

#3 User is offline   habatone 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 97
  • Joined: 02-February 12

Posted 19 February 2012 - 12:43 PM

That's what I thought, I'm getting this error now though, any ideas?

I/O warning : failed to load external entity "questions.xml"

here's my code

$file= "questions.xml";
$xml = simplexml_load_file($file);
return $xml;
0

#4 User is offline   andy_s 

  • Random Member Title
  • Yii
  • Group: Moderators
  • Posts: 1,526
  • Joined: 22-June 09
  • Location:Russia, Kostroma

Posted 19 February 2012 - 12:48 PM

Sorry, I have to move the topic to "General PHP Topics" now.
0

#5 User is offline   Max_Power 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 10
  • Joined: 13-December 10

Posted 02 March 2012 - 04:59 PM

Is that the full path to the file?
0

#6 User is offline   Johnny Gan 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 197
  • Joined: 30-May 13

Posted 28 October 2013 - 08:34 AM

Yes, it's full path file.

See http://www.php.net/m...l-load-file.php
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users