我有几::
<myco:results xmlns:myco="http://myco.mycollp.com" resultsTypeID="StockChart">
<myco:row xmlns:myco="http://myco.mycollp.com">
<myco:price title="stock">0.6107013847</myco:price>
<myco:price title="index">0.61965464</myco:price>
</myco:row>
</myco:results>
我正在使用以下格乌拉:
$(xml).find("row").each(function () {
var stockPrice = $(this).find("price[title= stock ]").text();
}
However stockPrice is always coming back as an empty string.
如果我检查:
$(this).find("price[title!= stock ]")
有效期为2年而不是1年,
$(this).find("price[title= stock ]")
长度为0。
我做了什么错误?
<>>>>>
我已经给人以全身的xml,带名字空间,但我没有这样做,这原本是为了使这个例子更清楚,但这可能是问题的根源,因此,现在就有了全面的XML。