1.关于google.com的Alexa响应:http://pastebin.com/C5yjSjCf -in --其他词--它代表12个简单表中的一行,称为"ContactInfo“”按国家排列“,.
再举一个例子(facebook.com) http://pastebin.com/mP813jYS
2.方案/数据类型信息:http://awis.amazonaws.com/AWSAlexa/AWSAlexa.xsd
我可以用xqilla做基本的xquery。
query.txt:
声明名称空间aws="http://alexa.com";
/aws:UrlInfoResponse/aws:Response/aws:UrlInfoResult/aws:Alexa/aws:ContentData/aws:DataUrl
xqilla -i alexa.xml query.txt
Error parsing resource: file:///var/www/google Error message: invalid content after root element's end tag [err:FODC0002]
xqilla -i google.xml query.txt
Error parsing resource: file:///var/www/Error message: invalid content after root element's end tag [err:FODC0002]alexa.xml (我实际上想要查询的文件),是许多这些api相互之间的响应。
我还尝试删除google.xml中的前3行和最后一行,并搜索和替换aws:‘和前导空格jsut,使其更简单,但仍然是相同的错误:(
发布于 2014-04-08 18:53:48
你说..。
alexa.xml (我实际上想要查询的文件),是许多这些api相互之间的响应。
听起来就是这样吗?你的档案看起来像这样吗?
<aws:UrlInfoResponse xmlns:aws="http://alexa.com">
<!--...-->
</aws:UrlInfoResponse>
<aws:UrlInfoResponse xmlns:aws="http://alexa.com">
<!--...-->
</aws:UrlInfoResponse>这也可以解释你的错误。只允许有一个根元素。您需要将其全部包装在另一个元素中。
示例:
<responses>
<aws:UrlInfoResponse xmlns:aws="http://alexa.com">
<!--...-->
</aws:UrlInfoResponse>
<aws:UrlInfoResponse xmlns:aws="http://alexa.com">
<!--...-->
</aws:UrlInfoResponse>
</responses>XPath:
/responses/aws:UrlInfoResponse/aws:Response/aws:UrlInfoResult/aws:Alexa/aws:ContentData/aws:DataUrlhttps://stackoverflow.com/questions/22943907
复制相似问题