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

Yes, I am sure. (Although I tried all kinds of headers - no result.)

I tried Encode::decode and had negative result with and without it.

Its amazon's client. YouTube has (except the values) the exactly same opensearch file layout - I even tried copy and paste their content - and sent it to amazon A9. Result: Error: no valid XML header *in* file.

Their works: http://a9.com/-/opensearch/?url=http%3A%2F%2Fwww.youtube.com%2Fopensearch
What is the magic to properly identify an XML file...?
  • Comment on Re^2: Output of XML: "valid XML header needed"-error (OpenSearch)?

Replies are listed 'Best First'.
Re^3: Output of XML: "valid XML header needed"-error (OpenSearch)?
by moritz (Cardinal) on Aug 24, 2007 at 17:59 UTC
    Try to write your XML to a file and configure Apache to send the application/opensearchdescription+xml Content-Type (that's what youtube uses).

    Try to validate your XML, at least for well-formedness (for example with xmlstarlet), and use wget --server-response $url to check that your webserver delivers the right headers.

    Could you tell us your URL, so that I can take a look as well?