<a id="yui_3_4_1_1_1329966665861_8510" class="buy-as-gift-link"
data-bntrack="buyasgift" href="#purchase=9780345527721"></a>
需要使用 Xpath 从此元素中提取“#purchase=9780345527721”
这是我到目前为止所做的:
$nodelist_nook = trim($xpath_nook->query("//a[@class='buy-as-gift-link']")->item(0)->nodeValue);