首页 \ 问答 \ 亚马逊API的价格返回false(Price returns false on amazon API)

亚马逊API的价格返回false(Price returns false on amazon API)

我希望在这里得到一些帮助我们似乎无法找到解决方案。 我们正在向亚马逊提出要求,但退回的价格是“假的”。 以下是返回值的URL:

http://vpaun.ro/test/amazon.php?debug=1&isbn=9780091883768

有什么想法会发生这种情况吗? 提前致谢!


Im hoping to get some help here with a problem we cant seem to find the solution to. We are making requests from amazon, but the returned price is "false". Here is the URL of the returned values:

http://vpaun.ro/test/amazon.php?debug=1&isbn=9780091883768

Any ideas why this would be happening? Thanks in advance!


原文:https://stackoverflow.com/questions/11318336
更新时间:2021-12-20 22:12

最满意答案

您有两个选项,使用通配符作为命名空间前缀:

<xsl:template match="*:root">
  <xsl:value-of select="*:child"/>
</xsl:template>

或者为不同的命名空间写匹配,例如

<xsl:stylesheet
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  xmlns:ptktims="http://www.example.com/ptktims"
  xmlns:times="http://www.example.com/times" version="2.0">

    <xsl:template match="root">
      <xsl:value-of select="child"/>
    </xsl:template>

    <xsl:template match="ptktims:root">
      <xsl:value-of select="times:child"/>
    </xsl:template>

第三个选项是链转换或转换步骤,其中第一步规范化命名空间(全部删除或放置所需的命名空间),然后第二步只需要使用规范化输入格式的模板。


You have two options, use a wild card for the namespace prefix:

<xsl:template match="*:root">
  <xsl:value-of select="*:child"/>
</xsl:template>

or write matches for the different namespaces e.g.

<xsl:stylesheet
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  xmlns:ptktims="http://www.example.com/ptktims"
  xmlns:times="http://www.example.com/times" version="2.0">

    <xsl:template match="root">
      <xsl:value-of select="child"/>
    </xsl:template>

    <xsl:template match="ptktims:root">
      <xsl:value-of select="times:child"/>
    </xsl:template>

A third option is to chain transformations or transformation steps where the first step normalizes the namespaces (either strips all or puts the ones you want in place) and the second step then only needs to work with templates for the normalized input format.

相关问答

更多
  • 这是我为我的问题找到的解决方案。 数据编织器的示例代码 info:{ field @(id: "!23" , value: payload.Response.Detail.Header.ID ): null } Soution info:{ field @(id: "!23" , value: payload.Response.Detail.Header.ID ): {} } 从我的回答中可以明显看出,我只需用{}替换null部分,然后停止生成 xmlns:xsi="http ...
  • ::fn引用全局命名空间中的某些东西(它是绝对路径)。 请注意,您可以使用using ;将内容导入全局命名空间using ; 或using namespace ; namespace::fn指的是名称空间中相对于当前名称空间的东西(它是一个相对路径)。 namespace X { namespace Y { int Z() { N::fn(); // ...
  • 来自cppreference.com: 命名空间提供了一种防止大型项目中的名称冲突的方法。 在命名空间块中声明的符号被放置在一个命名范围内,以防止它们被误认为其他范围中的同名命名符号。 允许具有相同名称的多个名称空间块。 这些块内的所有声明都在指定范围内声明。 命名空间的作用是避免名称冲突,例如标准库定义了sort()但这对于排序函数来说是一个非常好的名字,这要归功于您可以定义自己的sort()的名称空间,因为它不会位于相同的名称空间中作为标准之一。 using指令告诉编译器在当前范围中使用该名称空间,以便 ...
  • 通常,在这种情况下,我离开配置名称空间,并使用别名来访问我的名称空间(而不是完全限定)。 例如: using System.Configuration; using PC = MyCompany.MyProduct.Configuration; // ... string configValue = PC.ConfigurationManager.GetValue("Foo"); Typically, in cases like this, I leave the Configuration name ...
  • 请参阅此链接以查找依赖于参数的名称: http : //en.wikipedia.org/wiki/Argument-dependent_name_lookup 当编译器无法找到非限定converter() ,它将查找可用的命名空间,并在名称和签名匹配时使用它们。 在这种情况下,main.cpp包含我认为的Ccon.h头文件,它定义了这个命名空间,所以它查看了带有void参数的converter() 。 Please see this link for argument-dependant name loo ...
  • 您有两个选项,使用通配符作为命名空间前缀: 或者为不同的命名空间写匹配,例如
    使用java.xml.validation您可以指定XSD架构,该架构应该用于验证XML文档而不被文档引用: import javax.xml.XMLConstants; import javax.xml.parsers.SAXParserFactory; import javax.xml.validation.Schema; import javax.xml.validation.SchemaFactory; import org.xml.sax.InputSource; import org.xml.s ...
  • 现在存在的规范是在1995年在N0783中引入的,用于纠正极端情况。 引用该论文(第9页): WP将未命名的命名空间的语义定义为等效于: namespace UNIQUE { // namespace body } using namespace UNIQUE; 这是不正确的,因为它使未命名的命名空间中的代码取决于代码是在原始命名空间还是命名空间扩展中。 namespace {} // If you remove this line, the // use of ::f ...
  • 听起来你可能想要从命名空间到类的Lookup : var lookup = assembly.GetTypes().ToLookup(t => t.Namespace); 或者(也可以非常相似)你可以使用GroupBy : var groups = assembly.GetTypes().GroupBy(t => t.Namespace); 例如: var groups = assembly.GetTypes() .Where(t => t.IsClass) / ...
  • 在SOAPUI中,即使该节点上没有名称空间定义,您也可以使用XPath (您的名称空间可能在元素的父节点中定义)。 在您的问题中,您不清楚您想要做什么,例如,如果您想检查元素的contentLenght属性的值,您可以使用以下XPath来获取值: //data/@contentLength 如果您在响应中有的测试步骤请求,并且您要求在groovy测试步骤中进行制作和断言,则可以使用以下代码执行此操作: def content = context.expand('${You ...

相关文章

更多

最新问答

更多
  • 您如何使用git diff文件,并将其应用于同一存储库的副本的本地分支?(How do you take a git diff file, and apply it to a local branch that is a copy of the same repository?)
  • 将长浮点值剪切为2个小数点并复制到字符数组(Cut Long Float Value to 2 decimal points and copy to Character Array)
  • OctoberCMS侧边栏不呈现(OctoberCMS Sidebar not rendering)
  • 页面加载后对象是否有资格进行垃圾回收?(Are objects eligible for garbage collection after the page loads?)
  • codeigniter中的语言不能按预期工作(language in codeigniter doesn' t work as expected)
  • 在计算机拍照在哪里进入
  • 使用cin.get()从c ++中的输入流中丢弃不需要的字符(Using cin.get() to discard unwanted characters from the input stream in c++)
  • No for循环将在for循环中运行。(No for loop will run inside for loop. Testing for primes)
  • 单页应用程序:页面重新加载(Single Page Application: page reload)
  • 在循环中选择具有相似模式的列名称(Selecting Column Name With Similar Pattern in a Loop)
  • System.StackOverflow错误(System.StackOverflow error)
  • KnockoutJS未在嵌套模板上应用beforeRemove和afterAdd(KnockoutJS not applying beforeRemove and afterAdd on nested templates)
  • 散列包括方法和/或嵌套属性(Hash include methods and/or nested attributes)
  • android - 如何避免使用Samsung RFS文件系统延迟/冻结?(android - how to avoid lag/freezes with Samsung RFS filesystem?)
  • TensorFlow:基于索引列表创建新张量(TensorFlow: Create a new tensor based on list of indices)
  • 企业安全培训的各项内容
  • 错误:RPC失败;(error: RPC failed; curl transfer closed with outstanding read data remaining)
  • C#类名中允许哪些字符?(What characters are allowed in C# class name?)
  • NumPy:将int64值存储在np.array中并使用dtype float64并将其转换回整数是否安全?(NumPy: Is it safe to store an int64 value in an np.array with dtype float64 and later convert it back to integer?)
  • 注销后如何隐藏导航portlet?(How to hide navigation portlet after logout?)
  • 将多个行和可变行移动到列(moving multiple and variable rows to columns)
  • 提交表单时忽略基础href,而不使用Javascript(ignore base href when submitting form, without using Javascript)
  • 对setOnInfoWindowClickListener的意图(Intent on setOnInfoWindowClickListener)
  • Angular $资源不会改变方法(Angular $resource doesn't change method)
  • 在Angular 5中不是一个函数(is not a function in Angular 5)
  • 如何配置Composite C1以将.m和桌面作为同一站点提供服务(How to configure Composite C1 to serve .m and desktop as the same site)
  • 不适用:悬停在悬停时:在元素之前[复制](Don't apply :hover when hovering on :before element [duplicate])
  • 常见的python rpc和cli接口(Common python rpc and cli interface)
  • Mysql DB单个字段匹配多个其他字段(Mysql DB single field matching to multiple other fields)
  • 产品页面上的Magento Up出售对齐问题(Magento Up sell alignment issue on the products page)