【发布时间】:2019-04-02 02:33:09
【问题描述】:
我有像这样的类属性的跨度节点:
<span class=" cite fw-xl fz-ms lh-17">www.azlyrics.com</span>
<span class=" fz-ms fw-m fc-12th wr-bw lh-17">www.imdb.com</span>
我想使用 thes 类属性访问所有这些元素。我写了这段代码,但它返回null:
node.SelectSingleNode(".//span[contains(@class,'lh-17')]").InnerText;
我应该如何获得这两个元素?
【问题讨论】: