I have been playing with parsing XML in PHP . I have tested multiple examples on the web but perhaps there has been a change in the way this works with different PHP versions?
I tested the examples here: https://www.w3schools.com/php/php_xml_simplexml_read.asp I copied and pasted from their "working" examples in "Run Example" but it does not load!
NONE seem to work for me at least in my version of PHP (PHP 7.0.33-0+deb9u10)
Aside from that when I previously tried to test and had some success the issue I had was when the XML contained common field names like
<scan:DiscreteResolution>
<scan:XResolution>100</scan:XResolution>
<scan:YResolution>100</scan:YResolution>
</scan:DiscreteResolution>
<scan:DiscreteResolution>
<scan:XResolution>150</scan:XResolution>
<scan:YResolution>150</scan:YResolution>
</scan:DiscreteResolution>
As you can see above many start and end tags are repeated.
So may I ask simply what does work?