0
내가이 테이블에있는 IMG 값을 제외 할
<table class="info">
<tbody>
<tr><th class="round-top" colspan="2">Status</th></tr>
<tr class="even">
<td class="key">Schaltprogramm aktiv</td>
<td class="value"><img height="15" src="./pics/ste-symbol_an-97b765.png"></td>
</tr>
</tbody>
</table>
내가이 테이블의 값을 제외 할 :
여기<table class="info">
<tbody>
<tr><th class="round-top" colspan="2">Warmwasser</th></tr>
<tr class="even">
<td class="key">WW-Isttemp.</td>
<td class="value">49,0 °C</td>
</tr>
<tr class="odd">
<td class="key round-leftbottom">WW-Solltemp.</td>
<td class="value round-rightbottom">46,5 °C</td>
</tr>
</tbody></table>
내 잘못 시험은 다음과 같습니다
$nodelist = $xpath->query("//tr/td[substring(@class,1,5)='value']");
$imgs = $xpath->query("//table[@class='info']/tr/td/img");
"nodelist"변수에서 IMG 값을 제외하려면 어떻게해야합니까?
아이디어가 있으십니까?
XPath는 XML 문서의 * 쿼리 * 언어입니다. 따라서 XPath 표현식은 (노드를 작성하거나 삭제하여) 문서를 변경할 수 없습니다. 당신이해야 할 일은 문서를 다른 XML 문서로 변형시키는 것입니다. XSLT는 특히 XML 변환을 위해 고안된 언어입니다.이 특별한 변환은 XSLT를 사용하여 실현하기가 쉽습니다. XSLT 솔루션을 얻는 데 관심이 있습니까? –