Retrieve and store XML attributes in a PHP Array

Deadman24

New Member
I have an XML string like this in a PHP variable. This string is generated through a REST request to a service using nusoap in PHP\[code\]<exception name="xyz.TestException" message="Invalid Username.jake"/>\[/code\]How do I use PHP to retrieve the XML string attributes in an array, so I can use them for messaging purposes?\[code\]Ex: The result PHP array should look like this.$attrArray = array();$attrArray["name"]= "xyz.TestException" $attrArray["message"] = "Invalid Username.jake"\[/code\]Thanks,
 
Back
Top