2011-09-12 56 views

回答

7

這裏是opensearch.xml的例子,對我的作品:

<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/"> 
    <ShortName>Example.com</ShortName> 
    <LongName>Example.com Search</LongName> 
    <Description>Search through Example.com</Description> 
    <Query role="example" searchTerms="example search"/> 
    <InputEncoding>UTF-8</InputEncoding> 
    <OutputEncoding>UTF-8</OutputEncoding> 
    <AdultContent>false</AdultContent> 
    <Language>en-us</Language> 
    <SyndicationRight>open</SyndicationRight> 
    <Developer>Example.com</Developer> 
    <Tags>tag1,tag2</Tags> 
    <Image height="16" width="16" type="image/vnd.microsoft.icon">http://example.com/favicon.ico</Image> 
    <Url type="text/html" template="http://example.com/search.html?q={searchTerms}"/> 
    <Url type="application/x-suggestions+json" template="http://example.com/suggestions.html?query={searchTerms}"/> 
</OpenSearchDescription> 

我覺得localhost和/或非標準的端口3000也可能有助於問題。

+0

你如何找到直接導致目標網站上的查詢框的網址? (例如谷歌翻譯) – JinSnow

相關問題