Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Output of XML: "valid XML header needed"-error (OpenSearch)?

by clinton (Priest)
on Aug 24, 2007 at 17:53 UTC ( [id://634927]=note: print w/replies, xml ) Need Help??


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:

  • Check the headers that are actually being sent by your server. You could use use wget -S http://yoururl or a Firefox plugin like LiveHeaders

  • Check that there is no whitespace before your XML declaration

  • Check that your XML is valid with XML::LibXML::Schema - the online validator doesn't check schemas

  • Check that your text is UTF-8 print utf8::is_valid($text); print utf8::is_utf8($text)

  • Try with plain ASCII data, perhaps with a static file, just to see if that works

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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://634927]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (5)
As of 2024-04-20 00:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found