I have this error :Warning: simplexml_load_string() expects parameter 1 to be string, object given in on line 195
and also this error: Fatal error: Call to a member function xpath() on a non-object in C:\wamp\
so my code in following :
foreach ( $GetJobResult->JobReferences as $jobreference_index => $JobReferences ) {
if (isset ( $GetJobResult->JobReferences )) {
$xmlJobReference = simplexml_load_string ( $JobReferences );
$JobReferencetitle = $xmlJobReference->xpath ( "//JobReference[Title ='N° ANCIEN DOSSIER']/Reference" );
var_dump($GetJobResult->JobReferences);
}
}
var_dump($GetJobResult->JobReferences);
object(stdClass)[149]
public 'JobReference' =>
array (size=7)
0 =>
object(stdClass)[150]
public 'Type' => string 'STANDARD' (length=8)
public 'Title' => string 'N° cde client' (length=14)
public 'Reference' => string '' (length=0)
public 'ValueType' => string 'ALPHANUMERIC' (length=12)
public 'ValueLength_Minimum' => int 0
public 'ValueLength_Maximum' => int 20
1 =>
object(stdClass)[151]
public 'Type' => string 'STANDARD' (length=8)
public 'Title' => string 'N° ANCIEN DOSSIER' (length=19)
public 'Reference' => string '' (length=0)
public 'ValueType' => string 'NUMERIC' (length=7)
public 'ValueLength_Minimum' => int 0
public 'ValueLength_Maximum' => int 6