-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathxpath
16 lines (13 loc) · 2.78 KB
/
xpath
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
<?php
$str = '<response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="typemap_get" transaction_id="1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><map name="bool" type="bool" xsi:type="xsd:boolean"></map><map name="int" type="int" xsi:type="xsd:decimal"></map><map name="float" type="float" xsi:type="xsd:double"></map><map name="string" type="string" xsi:type="xsd:string"></map><map name="null" type="null"></map><map name="array" type="hash"></map><map name="object" type="object"></map><map name="resource" type="resource"></map></response>';
$str = '<response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="feature_set" transaction_id="3" feature="max_depth" success="1"></response>';
$str = '<response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="breakpoint_list" transaction_id="10"><breakpoint type="line" filename="file:///var/www/html/index.php" lineno="6" state="enabled" hit_count="0" hit_value="0" id="140001"></breakpoint><breakpoint type="line" filename="file:///var/www/html/index.php" lineno="8" state="enabled" hit_count="0" hit_value="0" id="140002"></breakpoint></response>';
$str = '<response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="step_into" transaction_id="7" status="break" reason="ok"><xdebug:message filename="file:///var/www/html/index.php" lineno="3"></xdebug:message></response>';
$str = '<response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="stack_get" transaction_id="15"><stack where="require_once" level="0" type="file" filename="file:///var/www/html/index2.php" lineno="8"></stack><stack where="{main}" level="1" type="file" filename="file:///var/www/html/index.php" lineno="6"></stack></response>';
$str = '<response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="run" transaction_id="13" status="break" reason="ok"><xdebug:message filename="file:///var/www/html/index2.php" lineno="8"></xdebug:message></response>';
$str = '<response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="source" transaction_id="13" encoding="base64"><![CDATA[PD9waHAKZWNobyAiYSI7CmVjaG8gImEiOwplY2hvICJhIjsKZWNobyAiYSI7CnJlcXVpcmVfb25jZSBfX0RJUl9fIC4gJy9pbmRleDIucGhwJzsKZWNobyAiYSI7CmVjaG8gImEiOwplY2hvICJhIjsKZWNobyAiYSI7CmVjaG8gImEiOwo=]]></response>';
$str = '<response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="stop" transaction_id="19" status="stopped" reason="ok"></response>';
$xml = simplexml_load_string($str);
foreach ($xml->getDocNamespaces() as $prefix => $ns) {
$xml->registerXPathNamespace($prefix ?: 'a', $ns);
}