Answer the question
In order to leave comments, you need to log in
How to convert XML string to object?
Can't parse XML into object:
<?php
error_reporting(E_ALL);
$xml = <<<EOD
<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:ns1="http://sharepoint.l/namespace.php" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:enc="http://www.w3.org/2003/05/soap-encoding">
<env:Body>
<ns1:GetList env:encodingStyle="http://www.w3.org/2003/05/soap-encoding">
<param0 xsi:type="xsd:string">AA7D945C-E5C3-4854-B631-10A98E711E2B</param0>
</ns1:GetList>
</env:Body>
</env:Envelope>
EOD;
$sop = simplexml_load_string($xml);
var_dump($sop);
class SimpleXMLElement#1 (0) {
}
Answer the question
In order to leave comments, you need to log in
I will answer myself.
Preliminary solution:
$sop = simplexml_load_string($xml);
$Body = $sop->children('http://www.w3.org/2003/05/soap-envelope');
$GetList = $Body->children('http://sharepoint.l/namespace.php');
$param0 = $GetList->children();
$code = (string)$param0;// получаем значение AA7D945C-E5C3-4854-B631-10A98E711E2B
Shouldn't there be an additional class_name parameter? php.net/manual/ru/function.simplexml-load-string.php
Try like this:
@font-face {
font-face: 'Mido Medium';
src: url('../fonts/Mido-Medium.eot?#iefix') format('embedded-opentype'),
url('../fonts/Mido-Medium.woff') format('woff'),
url('../fonts/Mido-Medium.ttf') format('truetype');
}
woff
andwoff2
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question