4
可能重複:
How do I select multiple sets of attributes within an XML document using XPath?如何選擇多個屬性的XPath查詢
我的HTML代碼:
<table width="100%" cellpadding="6" cellspacing="0">
我想不僅是指定選擇此表寬度,但也與cellpadding和cellspacing ..
我使用這個PHP代碼:
$query = $xpath->query('//table[@width|@cellpadding|@cellspacing]');
,但它仍然顯示整個HTML源代碼,而不是我想要的東西..
幫我請..
實際上,我已經看到它,但它並沒有在我的情況下。可能我不知道如何使它在html..im新使用xpath ..我需要幫助:| |感謝您的迴應 – Vainglory07