in reply to Output of XML: "valid XML header needed"-error (OpenSearch)?

There is no magic XML byte, and XML is text. Here are the things I would do:

If all of the above fails, try posting more of the code, plus a link to the URL that you are sending to OpenSearch, so we can look at it

Clint