我正在设置UTF-8谷歌自定义搜索引擎。我已经编写了XML上下文文件,但是不会上传。
我已经通过多个验证器运行XML,并让其他人来研究它,但是似乎没有任何问题。
<?xml version="1.0" encoding="UTF-8"?>
<CustomSearchEngine id="3yydrop0z2m" creator="007729199335892686358" keywords="Maine, school" language="en" encoding="UTF-8" autocompletions="true">
<Title>School Search Engine</Title>
<Description>Searches Public School Pages in Maine</Description>
<Annotations>
<Annotation about="www.facebook.com/*">
<Label name="_cse_3yydrop0z2m"></Label>
</Annotation>
<Annotation about="https://twitter.com/*">
<Label name="_cse_3yydrop0z2m"></Label>
</Annotation>
</Annotations>
<Context>
<Facet>
<FacetItem title="Twitter">
<Label name="twitter" mode="BOOST" weight="0.5"></Label>
</FacetItem>
</Facet>
<Facet>
<FacetItem title="Maine">
<Label name="maine" mode="BOOST" weight="0.7"></Label>
</FacetItem>
</Facet>
<Facet>
<FacetItem title="High School">
<Label name="high" mode="BOOST" weight="0.8">
<Rewrite>high school OR academy OR high</Rewrite>
</Label>
</FacetItem>
</Facet>
<Facet>
<FacetItem title="Middle School">
<Label name="middle" mode="BOOST" weight="0.7">
<Rewrite>middle school OR middle</Rewrite>
</Label>
</FacetItem>
</Facet>
<Facet>
<FacetItem title="Elementary School">
<Label name="elementary" mode="BOOST" weight="0.7">
<Rewrite>primary OR grammar school OR elementary</Rewrite>
</Label>
</FacetItem>
</Facet>
<Facet>
<FacetItem name="museum">
<Label name="museum" mode="ELIMINATE"></Label>
</FacetItem>
</Facet>
<Facet>
<FacetItem name="town hall">
<Label name="town hall" mode="ELIMINATE">
<Rewrite>community OR city council</Rewrite>
</Label>
</FacetItem>
</Facet>
<Facet>
<FacetItem name="other state">
<Label name="other state" mode="ELIMINATE">
<Rewrite>Alabama OR Alaska</Rewrite>
</Label>
</FacetItem>
</Facet>
<BackgroundLabels>
<Label name="https://www.Facebook.com/*" mode="FILTER"/>
<Label name="https://www.Twitter.com/*" mode="FILTER"/>
<Label name="_cse_3yydrop0z2m" mode="FILTER"/>
<Label name="_cse_exclude_3yydrop0z2m" mode="ELIMINATE"/>
</BackgroundLabels>
</Context>
<LookAndFeel element_layout="8" theme="7" custom_theme="false" url_length="full" element_branding="show" enable_cse_thumbnail="true" promotion_url_length="full" font="2">
<Logo url="http://inet.state.me.us/education/communications/images/informal01R-200.png" height="50"/>
<Colors url="#3366cc" background="#FFFFFF" border="#162C40" title="#274F73" text="#000000" visited="ffbd10" visible_hover="#162C40" visible_active="#0000CC"/>
<Promotions/>
<SearchControls/>
<Results border_color="FFFFFF" border_hover_color="#162C40" background_color="#FFFFFF" background_hover_color="#FFFFFF"/>
</LookAndFeel>
<ImageSearchSettings enable="false"/>
<autocomplete_settings/>
</CustomSearchEngine>
这可能是什么潜在的根本问题?我知道我不应该上传所有代码,但是我不确定它到底出了什么问题。
答案 0 :(得分:0)
注释和上下文分别管理,需要上载到不同的XML文件中。尝试从XML中删除<Annotations>
块。