2
如何使用简单的饼从s:variant模块获取标题标签?用简单的饼从原子饲料中提取<s:variant>
<s:variant>
<id>product_variants-96590662</id>
<title>Default Title</title>
<s:price currency="GBP">10.00</s:price>
<s:sku>002</s:sku>
<s:grams>0</s:grams>
</s:variant>
我试过下面来利用,同时也“变种”,只是“S”
$caption = $item->get_item_tags('http://www.w3.org/2005/Atom', 's:variant');
有问题的饲料here(从shopify),并在get_item_tags的文档是here。
命名空间的URL返回404,这有什么关系吗? – addedlovely 2011-06-03 15:36:39
shopify不再支持它们使用的命名空间。在这种情况下,即使参数现在已经很好,这种方法也可能不起作用。我会尝试做一个完整的解析,并转储结果,也许你可以得到你需要的方式。 – aorcsik 2011-06-03 15:45:30
嗯似乎回到我稍微更小的阵列,这是更可行。谢谢。 – addedlovely 2011-06-03 15:49:30