1

My problem: my received string size is ca. 4 MB

and this string doesn't not load in simplexml_load_string (return bool(false)).

The data is received with SoapClient.

How can I load this string in xml?

Code:

$client = new SoapClient('mydomain.com',array("trace"=> 1,"exceptions" => 0,'features' => SOAP_SINGLE_ELEMENT_ARRAYS));
$result=$client->GetArlistaAuth(array('pid'=>$pid,'partnerkod'=>$partnerkod, 'authcode'=>$authcode));
$xml = simplexml_load_string($result, 'SimpleXMLElement', LIBXML_COMPACT | LIBXML_PARSEHUGE);
Jens A. Koch
  • 39,862
  • 13
  • 113
  • 141
LSG
  • 61
  • 7
  • I guess a part fall off your question, what is the content of the data you received (`$result`)? – Peter van der Wal Aug 09 '14 at 09:31
  • print your ($result) first – Padmanathan J Aug 09 '14 at 09:33
  • echo $result is noting, but var_dump($result) is: [code]902GD450153700,00000003700,0000000[/code] and this more.... – LSG Aug 09 '14 at 09:39
  • try DOMDocument maybe (http://php.net/manual/en/domdocument.loadxml.php) – birdspider Aug 09 '14 at 10:46
  • my new code is: $reader = new XMLReader(); $reader->xml($f); $i = 0; foreach($reader->read() as $item){ $i++; echo($reader->readString()."
    "); } echo $i." rows"; this code not really working, because rows is: only third rows is good. and end of loop not write $i why?
    – LSG Aug 10 '14 at 22:20

0 Answers0