这是我的xpath查询:
'//div[contains(@class,"group") and contains(@class,"group-even")]//div[descendant-or-self::text()]'
结果:
<div>
<h3>Online Services</h3>
<ul>
<li><a href="https://www.domain.com/shipping/label.htm" onclick="dcsMultiTrack('DCS.dcsuri','/POLocator/', 'WT.ti','Link: POLocator: OnlineServices: PrintLabelwPostge', 'WT.z_section','POLocator', 'WT.z_link','OnlineServices_PrintLabelwPostge','WT.dl','1000')">Print a Label with Postage ›</a></li>
<li><a href="https://www.domain.com/shipping/carrierpickup/welcome.htm" onclick="dcsMultiTrack('DCS.dcsuri','/POLocator/', 'WT.ti','Link: POLocator: OnlineServices: SchedPckup', 'WT.z_section','POLocator', 'WT.z_link','OnlineServices_SchedPckup','WT.dl','1000')">Schedule a Pickup ›</a></li>
</ul>
/div>
是否可以从标签中排除onclick =“value”?