Hello,
Forgive me if this is a newbie type question....just can't seem to figure this out.
I am making a call to a remote API in my code and that call will return certain values in XML format. What I'm trying to figure out is how to parse those values and assign them to a variable. Here's what I mean:
API Call:
$xml = simplexml_load_file($url);
($url is defined earlier in my code as http://servername/GetUser.do?User=Jason)
This call will return the following:
<users>
<user LoginName="Jason" ClientType="ABC" Email="jason@abc.com">
</user>
</users>
Now, I want to take each of these XML element values and assign them to a variable:
$LoginName = ?????
How do I retrieve the value from 'LoginName' and assign it to this variable?
Thank you SO much for the help!
Jason