Fatal error:call to undefined method stdClass::xpath()

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • manjava
    New Member
    • Sep 2009
    • 132

    #1

    Fatal error:call to undefined method stdClass::xpath()

    I have this in xml
    Code:
    <JobReference> 
    <Type>STANDARD</Type> 
    <Title>N° ANCIEN DOSSIER</Title> 
    <Reference/>
    am having this error

    Fatal error:call to undefined method stdClass::xpath () on line 190
    Code:
    $xmljobreference = simplexml_load_string ($GetJobResult->JobReferences->JobReference->Title );    
    
    $referenceanciendossier = $GetJobResult->JobReferences->xpath( "//JobReference[@Title ='N°  ANCIEN DOSSIER']/Reference" );
    
    var_dump($referenceanciendossier);
    How can i resolve this issue thanks in advance
  • Dormilich
    Recognized Expert Expert
    • Aug 2008
    • 8694

    #2
    don’t confuse a JSON decoded object with XML.

    Comment

    Working...