完全停止XML和PHP的复杂性

I have the following PHP code:

<?php
    $string = "
    <root>
    <row>
        <kod>1.1</kod>
        <kategorie>Title1</kategorie>
    </row>
    <row>
        <kod>1.2</kod>
        <kategorie>Title2</kategorie>
    </row>
</root>";

    $xml = simplexml_load_string($string);

    //print_r($xml);

    foreach($xml->children() as $item){
        echo $item->kod;
        echo "<BR />";
    }
?>

I saw no output, only two <BR />. I don't understand why. Is the fullstop in 1.1 the problem? Or is kod some keyword in PHP? It showed me only onetimes the output, but not again, but I changed nothing. If I write echo $item->kategorie; everything is OK. Thank you.

echo $string, see view source and you will get invisible '?' in <code>

<root>
<row>
        <?kod>1.1</?kod>
        <kategorie>Title1</kategorie>
    </row>
    <row>
        <?kod>1.2</?kod>
        <kategorie>Title2</kategorie>
    </row>
</root>

Solution:

I have researched much but didn't find a good solution. Since we know we are getting '?' in the xml, following would be helpful for temporary solution.

$string = preg_replace(array('/<\?/', '/<\/\?/'), array('<', '</'), $string);