symfony
symfony forum
Home » support » General discussion » Call to undefined method SimpleXMLElement::__toString()
Call to undefined method SimpleXMLElement::__toString() [message #29411] Thu, 14 June 2007 22:59 Go to next message
musikman  is currently offline musikman
Messages: 13
Registered: February 2007
Location: Vancouver, BC Canada
Junior Member
Hi! I use simplexml to parse xml feed that we receive from other site. Everytime i tried to put the info that we receive from these XML, if receive the error message when i try to insert the data in the database: Fatal error: Call to undefined method SimpleXMLElement::__toString() in /usr/local/share/pear/symfony/vendor/creole/common/PreparedS tatementCommon.php on line 596. What can i do to solve that? Thanks!
Re: Call to undefined method SimpleXMLElement::__toString() [message #29429 is a reply to message #29411 ] Fri, 15 June 2007 06:18 Go to previous messageGo to next message
port  is currently offline port
Messages: 408
Registered: February 2007
Location: Dayton, Ohio, USA
Faithful Member
Dear Friend:

Let us see the code.

Port


"What if I stumble, what if I fall?
What if I lose my step and I make fools of us all?
Will the love continue when my walk becomes a crawl?
What if I stumble, and what if I fall?" -- DC Talk
Re: Call to undefined method SimpleXMLElement::__toString() [message #29446 is a reply to message #29429 ] Fri, 15 June 2007 11:22 Go to previous messageGo to next message
cblin  is currently offline cblin
Messages: 265
Registered: July 2006
Faithful Member
you are probably trying to insert a simplexml objet into a string column.

i.e you are doing something like :
$this->feed = new SimpleXml($feedurl);
/*..*/
$this->save();

this can not work since simplexml has no toString method and you will have to do $this->feed->asXML()
Re: Call to undefined method SimpleXMLElement::__toString() [message #29479 is a reply to message #29411 ] Fri, 15 June 2007 17:28 Go to previous message
musikman  is currently offline musikman
Messages: 13
Registered: February 2007
Location: Vancouver, BC Canada
Junior Member
Thank you! Problem solved
Previous Topic:url_to & routing
Next Topic:$this->getRequestParameter returns empty in Ajax request
Goto Forum:
  

powered by FUDforum - copyright ©2001-2004 FUD Forum Bulletin Board Software