SimpleXML Returns 0 Element

SYNERGY6

New Member
I'm taking my response from a Soap Request, and passing it into a new SimpleXML construct. \[code\]$response = $this->client->$method(array("Request" => $this->params));$response_string = $this->client->__getLastResponse();$this->response = new Classes_Result(new SimpleXMLElement($result));\[/code\]If I echo the $response_string, it outputs a proper xml string. Here is a snippet as it's quite long.\[code\]<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <soap:Body><GetClassesResponse xmlns="http://clients.mindbodyonline.com/api/0_5"> <GetClassesResult> <Status>Success</Status> <XMLDetail>Full</XMLDetail> <ResultCount>6</ResultCount> <CurrentPageIndex>0</CurrentPageIndex> <TotalPageCount>1</TotalPageCount> <Classes> <Class> <ClassScheduleID>4</ClassScheduleID> <Location> <SiteID>20853</SiteID> ....</soap:Envelope>\[/code\]Hoever, when I try to work with this object, I get errors or if I dump the object it outputs:\[code\]object(SimpleXMLElement)#51 (0)\[/code\]Any ideas why this might be happening?
 
Back
Top