<?php
$xml = <<<XML
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<GetContact_tResponse xmlns="http://api.mymip.be/">
<GetContact_tResult>
<returnStatus>
<errorNumber>0</errorNumber>
<errorMessage>OK</errorMessage>
</returnStatus>
<data>
<creation>2013-05-02T09:02:00.100</creation>
<created_by>sa</created_by>
<modification>2013-11-09T17:47:32.433</modification>
<modified_by>dbo</modified_by>
<URN>D00000196</URN>
<conieID>1</conieID>
<conseID>1</conseID>
<ContactRelationTouchPoints/>
<ContactUniqueIds/>
<ContactPermissions>
<ContactPermission>
<creation>2013-11-19T18:31:39.340</creation>
<created_by>test</created_by>
<permID>111</permID>
<URN>D00000196</URN>
<inOut>O</inOut>
<isExplicit>1</isExplicit>
<cbpID>1</cbpID>
<cbpCode description="Default : All">01000000000</cbpCode>
<channelCode description="Mobile sms/text">SMS</channelCode>
</ContactPermission>
</ContactPermissions>
<ContactRelationAttributes>
<ContactRelationAttribute>
<creation>2013-05-02T09:02:00.127</creation>
<created_by>sa</created_by>
<relabID>1</relabID>
<URN>D00000196</URN>
<value/>
<relabCode description="Is Parent of family">PARENT</relabCode>
</ContactRelationAttribute>
</ContactRelationAttributes>
<ContactIndividualEntity>
<creation>2013-05-02T09:01:59.967</creation>
<created_by>sa</created_by>
<modification>2013-11-09T17:26:40.267</modification>
<modified_by>dbo</modified_by>
<conieID>1</conieID>
<firstName>dfjcuzn</firstName>
<familyName>fgrvphokma</familyName>
<dob>2013-08-13</dob>
<ContactIndividualAttributes>
<ContactIndividualAttribute>
<creation>2013-05-02T09:02:00.033</creation>
<created_by>sa</created_by>
<coniaID>1</coniaID>
<conieID>1</conieID>
<value>FCO</value>
<coniaCode description="Nickname">NICK</coniaCode>
</ContactIndividualAttribute>
</ContactIndividualAttributes>
<genderCode description="Male">M</genderCode>
<languageCode description="Dutch">nl</languageCode>
<titleCode description="Default" salutation="De Heer">0</titleCode>
<conieStatusCode description="Valid" isValid="0">V</conieStatusCode>
</ContactIndividualEntity>
<ContactSocialEntity>
<creation>2013-05-02T09:02:00.050</creation>
<created_by>sa</created_by>
<modification>2013-11-09T17:26:51.320</modification>
<modified_by>dbo</modified_by>
<conseID>1</conseID>
<conseCode description="Family">FAM</conseCode>
<name>foo</name>
<languageCode description="Dutch">nl</languageCode>
<legalFormCode description="No legalFormCode"/>
<conseStatusCode description="Valid" isValid="0">V</conseStatusCode>
<ContactSocialAttributes/>
</ContactSocialEntity>
<languageCode description="Dutch">nl</languageCode>
</data>
</GetContact_tResult>
</GetContact_tResponse>
</soap:Body>
</soap:Envelope>
XML;
$doc = new DOMDocument();
$doc->loadXML($xml);
$xpath = new DOMXpath($doc);
$xpath->registerNamespace("api", "http://api.mymip.be/");
var_dump($xpath->query('//api:ContactPermission')->item(0));
- Output for 8.3.0 - 8.3.6
- object(DOMElement)#3 (27) {
["schemaTypeInfo"]=>
NULL
["tagName"]=>
string(17) "ContactPermission"
["className"]=>
string(0) ""
["id"]=>
string(0) ""
["firstElementChild"]=>
string(22) "(object value omitted)"
["lastElementChild"]=>
string(22) "(object value omitted)"
["childElementCount"]=>
int(9)
["previousElementSibling"]=>
NULL
["nextElementSibling"]=>
NULL
["nodeName"]=>
string(17) "ContactPermission"
["nodeValue"]=>
string(204) "
2013-11-19T18:31:39.340
test
111
D00000196
O
1
1
01000000000
SMS
"
["nodeType"]=>
int(1)
["parentNode"]=>
string(22) "(object value omitted)"
["parentElement"]=>
string(22) "(object value omitted)"
["childNodes"]=>
string(22) "(object value omitted)"
["firstChild"]=>
string(22) "(object value omitted)"
["lastChild"]=>
string(22) "(object value omitted)"
["previousSibling"]=>
string(22) "(object value omitted)"
["nextSibling"]=>
string(22) "(object value omitted)"
["attributes"]=>
string(22) "(object value omitted)"
["isConnected"]=>
bool(true)
["ownerDocument"]=>
string(22) "(object value omitted)"
["namespaceURI"]=>
string(20) "http://api.mymip.be/"
["prefix"]=>
string(0) ""
["localName"]=>
string(17) "ContactPermission"
["baseURI"]=>
string(1) "/"
["textContent"]=>
string(204) "
2013-11-19T18:31:39.340
test
111
D00000196
O
1
1
01000000000
SMS
"
}
- Output for 8.1.0 - 8.1.28, 8.2.0 - 8.2.18
- object(DOMElement)#3 (23) {
["schemaTypeInfo"]=>
NULL
["tagName"]=>
string(17) "ContactPermission"
["firstElementChild"]=>
string(22) "(object value omitted)"
["lastElementChild"]=>
string(22) "(object value omitted)"
["childElementCount"]=>
int(9)
["previousElementSibling"]=>
NULL
["nextElementSibling"]=>
NULL
["nodeName"]=>
string(17) "ContactPermission"
["nodeValue"]=>
string(204) "
2013-11-19T18:31:39.340
test
111
D00000196
O
1
1
01000000000
SMS
"
["nodeType"]=>
int(1)
["parentNode"]=>
string(22) "(object value omitted)"
["childNodes"]=>
string(22) "(object value omitted)"
["firstChild"]=>
string(22) "(object value omitted)"
["lastChild"]=>
string(22) "(object value omitted)"
["previousSibling"]=>
string(22) "(object value omitted)"
["nextSibling"]=>
string(22) "(object value omitted)"
["attributes"]=>
string(22) "(object value omitted)"
["ownerDocument"]=>
string(22) "(object value omitted)"
["namespaceURI"]=>
string(20) "http://api.mymip.be/"
["prefix"]=>
string(0) ""
["localName"]=>
string(17) "ContactPermission"
["baseURI"]=>
string(1) "/"
["textContent"]=>
string(204) "
2013-11-19T18:31:39.340
test
111
D00000196
O
1
1
01000000000
SMS
"
}
- Output for 8.0.0 - 8.0.30
- object(DOMElement)#3 (23) {
["tagName"]=>
string(17) "ContactPermission"
["schemaTypeInfo"]=>
NULL
["firstElementChild"]=>
string(22) "(object value omitted)"
["lastElementChild"]=>
string(22) "(object value omitted)"
["childElementCount"]=>
int(9)
["previousElementSibling"]=>
NULL
["nextElementSibling"]=>
NULL
["nodeName"]=>
string(17) "ContactPermission"
["nodeValue"]=>
string(204) "
2013-11-19T18:31:39.340
test
111
D00000196
O
1
1
01000000000
SMS
"
["nodeType"]=>
int(1)
["parentNode"]=>
string(22) "(object value omitted)"
["childNodes"]=>
string(22) "(object value omitted)"
["firstChild"]=>
string(22) "(object value omitted)"
["lastChild"]=>
string(22) "(object value omitted)"
["previousSibling"]=>
string(22) "(object value omitted)"
["nextSibling"]=>
string(22) "(object value omitted)"
["attributes"]=>
string(22) "(object value omitted)"
["ownerDocument"]=>
string(22) "(object value omitted)"
["namespaceURI"]=>
string(20) "http://api.mymip.be/"
["prefix"]=>
string(0) ""
["localName"]=>
string(17) "ContactPermission"
["baseURI"]=>
string(1) "/"
["textContent"]=>
string(204) "
2013-11-19T18:31:39.340
test
111
D00000196
O
1
1
01000000000
SMS
"
}
- Output for 5.3.11 - 5.3.29, 5.4.1 - 5.4.45, 5.5.0 - 5.5.38, 5.6.0 - 5.6.40, 7.0.0 - 7.0.33, 7.1.0 - 7.1.33, 7.2.0 - 7.2.33, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33
- object(DOMElement)#3 (18) {
["tagName"]=>
string(17) "ContactPermission"
["schemaTypeInfo"]=>
NULL
["nodeName"]=>
string(17) "ContactPermission"
["nodeValue"]=>
string(204) "
2013-11-19T18:31:39.340
test
111
D00000196
O
1
1
01000000000
SMS
"
["nodeType"]=>
int(1)
["parentNode"]=>
string(22) "(object value omitted)"
["childNodes"]=>
string(22) "(object value omitted)"
["firstChild"]=>
string(22) "(object value omitted)"
["lastChild"]=>
string(22) "(object value omitted)"
["previousSibling"]=>
string(22) "(object value omitted)"
["nextSibling"]=>
string(22) "(object value omitted)"
["attributes"]=>
string(22) "(object value omitted)"
["ownerDocument"]=>
string(22) "(object value omitted)"
["namespaceURI"]=>
string(20) "http://api.mymip.be/"
["prefix"]=>
string(0) ""
["localName"]=>
string(17) "ContactPermission"
["baseURI"]=>
string(1) "/"
["textContent"]=>
string(204) "
2013-11-19T18:31:39.340
test
111
D00000196
O
1
1
01000000000
SMS
"
}
- Output for 5.0.0 - 5.0.5, 5.1.0 - 5.1.6, 5.2.0 - 5.2.17, 5.3.0 - 5.3.10, 5.4.0
- object(DOMElement)#3 (0) {
}
- Output for 4.4.3 - 4.4.9
- Parse error: syntax error, unexpected T_OBJECT_OPERATOR in /in/CB37Y on line 95
Process exited with code 255. - Output for 4.4.2
- Parse error: syntax error, unexpected T_OBJECT_OPERATOR in /in/CB37Y on line 96
Process exited with code 255. - Output for 4.3.0 - 4.3.1, 4.3.5 - 4.3.11, 4.4.0 - 4.4.1
- Parse error: parse error, unexpected T_OBJECT_OPERATOR in /in/CB37Y on line 95
Process exited with code 255. - Output for 4.3.2 - 4.3.4
- Parse error: parse error in /in/CB37Y on line 95
Process exited with code 255.
preferences:
323.03 ms | 401 KiB | 460 Q