Hi! Could we please enable some services and cookies to improve your experience and our website?
Online Sandbox for SQL and PHP: Write, Run, Test, and Share SQL Queries and PHP Code
<?php
//$data = '<v:Envelope xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns:d="http://www.w3.org/2001/XMLSchema" xmlns:c="http://schemas.xmlsoap.org/soap/encoding/" xmlns:v="http://www.w3.org/2003/05/soap-envelope"><v:Header /><v:Body><n0:registerVisitByDistributor id="o0" c:root="1" xmlns:n0="http://registration.webservice.vivid.nl"><companyIdentificaton i:type="n1:string" xmlns:n1="http://www.usdbscar.com/2001/XMLSchema">launch_lic</companyIdentificaton><distributorPassword i:type="n2:string" xmlns:n2="http://www.usdbscar.com/2001/XMLSchema">her7teh2663gehd</distributorPassword><username i:type="n3:string" xmlns:n3="http://www.usdbscar.com/2001/XMLSchema">968590005261</username><n0:properties i:type="n0:properties"><n4:item i:type="n4:item" xmlns:n4="http://xml.apache.org/xml-soap"><key i:type="n5:string" xmlns:n5="http://www.usdbscar.com/2001/XMLSchema">interface</key><value i:type="n6:string" xmlns:n6="http://www.usdbscar.com/2001/XMLSchema">TOUCH</value></n4:item><n7:item i:type="n7:item" xmlns:n7="http://xml.apache.org/xml-soap"><key i:type="n8:string" xmlns:n8="http://www.usdbscar.com/2001/XMLSchema">languageCode</key><value i:type="n9:string" xmlns:n9="http://www.usdbscar.com/2001/XMLSchema">ru</value></n7:item></n0:properties></n0:registerVisitByDistributor></v:Body></v:Envelope>';
$data = '<v:Envelope xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns:d="http://www.w3.org/2001/XMLSchema" xmlns:c="http://schemas.xmlsoap.org/soap/encoding/" xmlns:v="http://www.w3.org/2003/05/soap-envelope"><v:Header /><v:Body><n0:registerVisitByDistributor id="o0" c:root="1" xmlns:n0="http://registration.webservice.vivid.nl"><companyIdentificaton i:type="n1:string" xmlns:n1="http://www.usdbscar.com/2001/XMLSchema">launch_lic</companyIdentificaton><distributorPassword i:type="n2:string" xmlns:n2="http://www.usdbscar.com/2001/XMLSchema">her7teh2663gehd</distributorPassword><username i:type="n3:string" xmlns:n3="http://www.usdbscar.com/2001/XMLSchema">968590005261</username><n0:properties i:type="n0:properties"><n4:item i:type="n4:item" xmlns:n4="http://xml.apache.org/xml-soap"><key i:type="n5:string" xmlns:n5="http://www.usdbscar.com/2001/XMLSchema">interface</key><value i:type="n6:string" xmlns:n6="http://www.usdbscar.com/2001/XMLSchema">TOUCH</value></n4:item><n7:item i:type="n7:item" xmlns:n7="http://xml.apache.org/xml-soap"><key i:type="n8:string" xmlns:n8="http://www.usdbscar.com/2001/XMLSchema">languageCode</key><value i:type="n9:string" xmlns:n9="http://www.usdbscar.com/2001/XMLSchema">ru</value></n7:item></n0:properties></n0:registerVisitByDistributor></v:Body></v:Envelope>';
$data = preg_replace("/(<\/?)(\w+):([^>]*>)/", "$1$2$3", $data);
$xml = new SimpleXMLElement($data);
$json = json_encode($xml);
$array = json_decode($json,TRUE);
print_r(array_values($array));
//print_r($array);
//echo $movies->vBody->n0registerVisitByDistributor->n0properties->n4item->value;