我正在使用AWS CLI,特别是cs-configure-from-batches命令,但我收到的格式错误无效,如下所示。
C:\>cs-configure-from-batches -d mysearchdomain --source C:\CloudSearch\AWSCloudSearchImplementation\XmlMiniBatch.xml --endpoint cloudsearch.ap-southeast-2.amazonaws.com --verbose
Connecting to CloudSearch in region [ap-southeast-2]
Sending to endpoint [https://cloudsearch.ap-southeast-2.amazonaws.com/] for region [ap-southeast-2]
Endpoint set as cloudsearch.ap-southeast-2.amazonaws.com
Analyzing sources.
Invalid format for C:\CloudSearch\AWSCloudSearchImplementation\XmlMiniBatch.xml, ignoring.
Analysis results.
这是我给它的xml
<?xml version="1.0" encoding="utf-8"?>
<batch>
<add id="96FD3C87-DF5C-E511-8167-02CC745DD7D4">
<field name="code">000000000000010000</field>
<field name="description">Blah Blah</field>
<field name="sprcode">4100</field>
<field name="levelonehierarchy">Blah</field>
<field name="leveltwohierarchy">Blah</field>
</add>
</batch>
是否有任何此命令将接受的示例xml文件?或者建议什么是错的?
答案 0 :(得分:0)
这个错误是由于使用UTF-8编码引起的,只要我使用没有BOM的UTF-8就行了!当然,愚蠢的我。