<?php
$x = <<<XML
<map>
<title>Wisburn Village</title>
<color1>0x0000FF</color1>
<color2>0x2b8300</color2>
<element id="tree_1">
<icon>7</icon>
<scale>1</scale>
</element>
<element id="tree_2">
<icon>7</icon>
<scale>1</scale>
</element>
<element id="tree_4">
<icon>7</icon>
<scale>0.9</scale>
</element>
<element id="house1">
<icon>2</icon>
<type>mission</type>
<name>Home</name>
</element>
<element id="cave_1">
<type>mission</type>
<icon>4</icon>
<name>Den of Trials</name>
<scale>0.9</scale>
<mission id="01">
<name>Gloop and Bloop</name>
<info>Let's see you fight some monsters in the den! These shouldn't prove much of a problem, show me what you can do!</info>
<enemies>
<enemy id="405"></enemy>
<enemy id="405"></enemy>
<enemy id="405"></enemy>
</enemies>
</mission>
</element>
<element id="link_1">
<type>link</type>
<to>02</to>
<name>to Quadra Plains</name>
<lv>1</lv>
</element>
</map>
XML;
$xml = simplexml_load_string($x);
list($test) = $xml->xpath("//type/@name");
echo $test;
- Output for 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.6
- Warning: Undefined array key 0 in /in/LBjLl on line 56
- Output for 5.3.0 - 5.3.29, 5.4.0 - 5.4.45, 5.5.0 - 5.5.38, 5.6.0 - 5.6.28, 7.0.0 - 7.0.20, 7.1.0 - 7.1.10, 7.2.0 - 7.2.33, 7.3.12 - 7.3.31, 7.4.0 - 7.4.25, 7.4.27 - 7.4.33
- Notice: Undefined offset: 0 in /in/LBjLl on line 56
- Output for 7.3.32 - 7.3.33, 7.4.26
- Output for 5.0.0 - 5.0.5, 5.1.0 - 5.1.1, 5.1.3 - 5.1.6, 5.2.0 - 5.2.17
- Notice: Undefined offset: 0 in /in/LBjLl on line 56
- Output for 5.1.2
- Notice: Undefined offset: 0 in /in/LBjLl on line 57
- Output for 4.4.5 - 4.4.9
- Fatal error: Call to undefined function: simplexml_load_string() in /in/LBjLl on line 54
Process exited with code 255. - Output for 4.3.2 - 4.3.11, 4.4.0 - 4.4.1, 4.4.3 - 4.4.4
- Fatal error: Call to undefined function: simplexml_load_string() in /in/LBjLl on line 54
Process exited with code 255. - Output for 4.4.2
- Fatal error: Call to undefined function: simplexml_load_string() in /in/LBjLl on line 55
Process exited with code 255. - Output for 4.3.0 - 4.3.1
- Fatal error: Call to undefined function: simplexml_load_string() in /in/LBjLl on line 54
preferences:
269.44 ms | 401 KiB | 358 Q