PHPize Online / SQLize Online  /  SQLtest Online

A A A
Share      Blog   Popular
Copy Format Clear
Copy Clear
Copy Format Clear
<?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 = strstr($data,'languageCode'); $data = strstr($data,'">'); $data = substr($data,2); preg_match('/<lanId i:type="d:string">[0-9]+<\/lanId>/', $data_lang, $res); $lanId = preg_replace("/<lanId i:type=\"d:string\">/", "", $res[0]); $lanId = preg_replace("/<\/lanId>/", "", $lanId); echo $data_lang; //$data = preg_replace("/(<\/?)(\w+):([^>]*>)/", "$1$2$3", $data); //$xml = new SimpleXMLElement($data); //$json = json_encode($xml); //$xml_fixed = json_decode($json); //print_r($xml_fixed); //echo $movies->vBody->n0registerVisitByDistributor->n0properties->n4item->value;
Show:  
Copy Clear