@ 2015-07-28T17:53:28Z <?php
$xml = '<?xml version="1.0" encoding="UTF-8"?><svg width="1840.71in" height="2057.42in" viewBox="0 -340 1840.71 2057.42" version="1.1" xmlns="http://www.w3.org/2000/svg" style="stroke-linecap:round;stroke-linejoin:round;fill:none" xmlns:qs="http://xmeasures.com/qs/elements/1.0/"> <text x="22" dx="0" y="-317.43" dy="13.33" font-family="Arial" font-size="18.67" line-height="1.1" fill="#000000" transform="rotate(360 22,-317.43)" text-anchor="start" qs:layer="T-Content">"Client":</text>
<text x="686.64" dx="0" y="-218.92" dy="16" font-family="Arial" font-size="22.4" line-height="1.1" fill="#000000" transform="rotate(360 686.64,-218.92)" text-anchor="start" qs:layer="T-Content">Version:</text>
<text x="22" dx="0" y="-277.44" dy="13.33" font-family="Arial" font-size="18.67" line-height="1.1" fill="#000000" transform="rotate(360 22,-277.44)" text-anchor="start" qs:layer="T-Content">Project Name:</text>
<text x="22" dx="0" y="-157.43" dy="13.33" font-family="Arial" font-size="18.67" line-height="1.1" fill="#000000" transform="rotate(360 22,-157.43)" text-anchor="start" qs:layer="T-Content">Date Created:</text>
<text x="166" dx="0" y="-316.75" dy="13.33" font-family="Arial" font-size="18.67" line-height="1.1" fill="#000000" transform="rotate(360 166,-316.75)" text-anchor="start" qs:layer="T-Project Info">xxxxx</text>
<text x="322" dx="0" y="-157.43" dy="13.33" font-family="Arial" font-size="18.67" line-height="1.1" fill="#000000" transform="rotate(360 322,-157.43)" text-anchor="start" qs:layer="T-Content">Date Revised:</text>
<text x="22" dx="0" y="-237.43" dy="13.33" font-family="Arial" font-size="18.67" line-height="1.1" fill="#000000" transform="rotate(360 22,-237.43)" text-anchor="start" qs:layer="T-Content">Address:</text>
<text x="166" dx="0" y="-237.43" dy="13.33" font-family="Arial" font-size="18.67" line-height="1.1" fill="#000000" transform="rotate(360 166,-237.43)" text-anchor="start" qs:layer="T-Project Info">xxxxx</text>
<text x="760" dx="0" y="-263.39" dy="24" font-family="Arial" font-weight="bold" font-size="33.6" line-height="1.1" fill="#000000" transform="rotate(360 760,-263.39)" text-anchor="middle" qs:layer="T-Floor ID">Floor 1</text>
<text x="833.36" dx="0" y="-218.93" dy="16" font-family="Arial" font-style="italic" font-size="22.4" line-height="1.1" fill="#ff0000" transform="rotate(360 833.36,-218.93)" text-anchor="end" qs:layer="T-Floor Plan Version">xxxxx</text>
<text x="22" dx="0" y="-197.44" dy="13.33" font-family="Arial" font-size="18.67" line-height="1.1" fill="#000000" transform="rotate(360 22,-197.44)" text-anchor="start" qs:layer="T-Content">City, Prov/State:</text>
<text x="165.59" dx="0" y="-197.44" dy="13.33" font-family="Arial" font-size="18.67" line-height="1.1" fill="#000000" transform="rotate(360 165.59,-197.44)" text-anchor="start" qs:layer="T-Project Info">xxxxxxx</text>
<text x="166" dx="0" y="-277.44" dy="13.33" font-family="Arial" font-size="18.67" line-height="1.1" fill="#000000" transform="rotate(360 166,-277.44)" text-anchor="start" qs:layer="T-Project Info">N/A</text>
</svg>';
$document = new \DOMDocument();
$document->loadXML($xml);
$xpath = new \DOMXPath($document);
$regNS = $xpath->registerNamespace("svg","http://www.w3.org/2000/svg");
$regNS2 = $xpath->registerNamespace("qs","http://xmeasures.com/qs/elements/1.0/");
$xpath1 = $xpath->query("//@qs:layer");
var_dump($xpath1);
$xpath2 = $xpath->query("//text[@layer='T-Content']");
var_dump($xpath2);
Enable javascript to submit You have javascript disabled. You will not be able to edit any code.
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 , 8.0.0 - 8.0.30 , 8.1.0 - 8.1.28 , 8.2.0 - 8.2.18 , 8.3.0 - 8.3.6 object(DOMNodeList)#16 (1) {
["length"]=>
int(13)
}
object(DOMNodeList)#17 (1) {
["length"]=>
int(0)
}
Output for 5.3.0 - 5.3.10 , 5.4.0 object(DOMNodeList)#16 (0) {
}
object(DOMNodeList)#17 (0) {
}
Output for 5.0.0 - 5.0.5 , 5.1.0 - 5.1.6 , 5.2.0 - 5.2.17 Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/U7mpq on line 18
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/U7mpq on line 20
object(DOMNodeList)#16 (0) {
}
object(DOMNodeList)#17 (0) {
}
Output for 4.3.2 - 4.3.11 , 4.4.0 - 4.4.9 Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/U7mpq on line 18
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/U7mpq on line 20
Fatal error: Cannot instantiate non-existent class: domdocument in /in/U7mpq on line 18
Process exited with code 255 . Output for 4.3.0 - 4.3.1 Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/U7mpq on line 18
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/U7mpq on line 20
Fatal error: Cannot instantiate non-existent class: domdocument in /in/U7mpq on line 18
preferences:dark mode live preview
312.27 ms | 402 KiB | 455 Q