You fell into the trap of SimpleXMLs automatic mapping. You iterate the child elements of the document element. This is the ReportArea inside the Report element node. You iterate this single element and access the first KURS and the first KUR_NAVN element inside it.
Use DOM+Xpath to fetch data from an XML. This is more like using SQL for an database.
// create the DOM and load the XML
$dom = new DOMDocument();
$dom->load('https://www.kursadmin.org/pls/kas/sf_fu.create_web_cdata_xml');
// create an Xpath object an register a prefix for the namespace
$xpath = new DOMXPath($dom);
$xpath->registerNamespace('cr', 'urn:crystal-reports:schemas');
// fetch the KURS_NAVN nodes and output them
foreach ($xpath->evaluate('//cr:KURS/cr:KURS_NAVN') as $node) {
echo $node->nodeValue . "<br>\n";
}
Output:
Spesialpedagogisk assistent- Mosjøen<br>
Spanskkurs nybegynner del 1+2 (A1), intensiv - Oslo<br>
Datakurs: Data grunnkurs - nybegynnere<br>
Norsk litt øvet (A2) - Eid<br>
Norskkurs mellomnivå del B (B1) - Bergen (1231)<br>
Sykurs: For det meste - helg<br>
Franskkurs nybegynner del 2, A1 - Biri<br>
...
Or, you can iterate the KURS element nodes and use them as an context for additional expressions.
foreach ($xpath->evaluate('//cr:KURS') as $node) {
echo $xpath->evaluate('string(cr:KURS_NAVN)', $node) . "<br>\n";
}