I'm a Java developer. How do I deal with an XML response using PHP?
- I would like to call a service HTTP (rest) that will return a XML.
- After getting this XML response, I would like to convert this XML into a Object (class) automatically like I've done in Java. (That is the part I don't know to cope with).
Example:
My xml:
<?xml>
<root>
<user_email>fde@xxx.com</user_email>
<user_name>FDE Test</user_name>
<password_expired>false</password_expired>
</root>
My class:
class User{
private $_userMail;
private $_userName;
private $_isPasswordExpired;
// Getters and Setters
}