Does anyone know if having multiple code fragments in 1 php page is slower perfomance than putting all the code of the page in 1 fragment
I expect the different to be negligible, but if you are really concerned, measure to find out.
On basic syntax, the PHP Manual says that "for outputting large blocks of text, dropping out of PHP parsing mode is generally more efficient than sending all of the text through echo() or print()". However, in your example the separation into two groups of opening/closing PHP tags has no use. You might as well place them all into one section since it makes it easier to read (or better yet, do not use PHP at all since you are printing static text that requires no preprocessing logic).
Also, note that you should use <?php, not <? as the latter is not guaranteed to be available on all PHP configurations and may conflict with <?xml opening tags.