java
html
php
xml
ajax
python
regex
mysql
objective-c
visual-studio
multithreading
eclipse
silverlight
flash
html5
json
oracle
api
postgresql
dom
You forgot to put in the closing '</menu>', without it your xml will be invalid
Btw, it's more readable and easy to create xml from ordinary array/object with SimpleXML class, or like that.
Try changing your <?xml line to
<?xml
<? echo '<'.'?xml version="1.0" encoding="UTF-8"?'.'>'; ?>