James Murphy
asked on
Simple XML data
Hi Experts!
Firstly thank you for taking a look at my question. I am having a shocking morning and can't for the life of me work out how to get the details out of the XML data.
given this XML:
["soapBody"]=>
object(SimpleXMLElement)#2 (1) {
["Response"]=>
object(SimpleXMLElement)#3 (5) {
["@attributes"]=>
array(2) {
["Version"]=>
string(3) "1.0"
["Environment"]=>
string(1) "T"
}
How do I access the Version and Environment data?
This is what I am trying -
$xml = new SimpleXMLElement($response );
$consumer = $xml->xpath('//Response/Ve rsion');
echo "<br><Br>Consumer:".$consu mer;
I have worked with this before but am having a brain block this morning.
This is the current response.
Notice: Array to string conversion in C:\xampp\htdocs\illion\ill ion v2.php on line 55
Consumer:Array
many thanks for you help!!!
Firstly thank you for taking a look at my question. I am having a shocking morning and can't for the life of me work out how to get the details out of the XML data.
given this XML:
["soapBody"]=>
object(SimpleXMLElement)#2
["Response"]=>
object(SimpleXMLElement)#3
["@attributes"]=>
array(2) {
["Version"]=>
string(3) "1.0"
["Environment"]=>
string(1) "T"
}
How do I access the Version and Environment data?
This is what I am trying -
$xml = new SimpleXMLElement($response
$consumer = $xml->xpath('//Response/Ve
echo "<br><Br>Consumer:".$consu
I have worked with this before but am having a brain block this morning.
This is the current response.
Notice: Array to string conversion in C:\xampp\htdocs\illion\ill
Consumer:Array
many thanks for you help!!!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.