🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: pl.comp.xml
Article #10044

jak napisać warunek xpath

#10044
From: kornik
Date: Sat, 03 Jan 2009 00:17
45 lines
1327 bytes
Jak powinien wyglądać warunek xpath dla takich danych:

<table>
   <tr>
     <td>
       <div>007</div>
     </td>

     <td>
       <div>cos </div>
     </td>

     <td>
       <div>cos innego</div>
     </td>

   </tr>

   <tr>
     <td>
       <div>008</div>
     </td>
   </tr>

   <tr>
     <td>
       <div>009</div>
     </td>
   </tr>

</table>


Interesuje mnie element
//table/tr
który zawiera <div>007</div>


Próbowałem tak
//table/tr/td[div=007]/parent::node()

Ale dostaje:
<div>007</div>
<div>cos </div>
<div>cos innego</div>
Technical Details
Message-ID: <gjmas6$vrg$1@portraits.wsisiz.edu.pl>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!newsfeed.gazeta.pl!wsisiz.edu.pl!not-for-mail

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!newsfeed.gazeta.pl!wsisiz.edu.pl!not-for-mail
From: kornik <kornik@kornik.pl>
Newsgroups: pl.comp.xml
Subject: jak napisać warunek xpath
Date: Sat, 03 Jan 2009 01:17:40 +0100
Organization: WSISiZ
Lines: 48
Sender: bulkowsk@nospam.wsisiz.edu.pl
Message-ID: <gjmas6$vrg$1@portraits.wsisiz.edu.pl>
NNTP-Posting-Host: host-81-190-157-8.olsztyn.mm.pl
Mime-Version: 1.0
X-Trace: portraits.wsisiz.edu.pl 1230941894 32624 81.190.157.8 (3 Jan 2009 00:18:14 GMT)
X-Complaints-To: abuse@wsisiz.edu.pl
NNTP-Posting-Date: Sat, 3 Jan 2009 00:18:14 +0000 (UTC)
User-Agent: Thunderbird 2.0.0.19 (Windows/20081209)
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit