We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 35903
    • 1 Posts
    Hi,

    I’m trying to use xpath in a snippet but it’s just not working, here is my code:

    $data = $xml->xpath('medialist[@group="image"]/media/link/targetUrl');


    i know this works because i’ve put it in a file outside of modx on the same server and it works fine.

    any ideas why xpath does not seem to be working?

    Cheers
    Sam