🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

4 total messages Started by kornik Sat, 06 Jun 2009 21:07
xpath - wszystkie elementy o atrybucie COS_*
#10186
Author: kornik
Date: Sat, 06 Jun 2009 21:07
24 lines
1086 bytes
jaki powinien być warunek xpath aby np. wybrać wszystkie DIV-y
które mają atrybut zawierający tekst COS_

np.

<html>
<div class=COS_1>
<div>

<div class=COS_2>
<div>

<div class=COS_3>
<div>

<div class=GDZIES_1>
<div>

</html>

//div - wybierze wszystkie
//div[@class="COS_.*"] - nie działa

Jakieś propozycje ?
Re: xpath - wszystkie elementy o atrybucie COS_*
#10187
Author: szomiz
Date: Sat, 06 Jun 2009 22:25
11 lines
1241 bytes
Użytkownik "kornik" <kornik@kornik.pl> napisał w wiadomości 
news:h0elqb$arl$1@portraits.wsisiz.edu.pl...

> //div - wybierze wszystkie
> //div[@class="COS_.*"] - nie działa
>
> Jakieś propozycje ?

Jakies funkcje xPath?

sz. 
Re: xpath - wszystkie elementy o atrybucie COS_*
#10188
Author: toudidel
Date: Sun, 07 Jun 2009 07:33
9 lines
1519 bytes
On 6 Cze, 23:07, kornik <kor...@kornik.pl> wrote:
> jaki powinien być warunek xpath aby np. wybrać wszystkie DIV-y
> które mają atrybut zawierający tekst COS_

właśnie, kluczem są funkcje...

//div[starts-with(@class,'COS_')]
--
td
Re: xpath - wszystkie elementy o atrybucie COS_*
#10189
Author: kornik
Date: Sun, 07 Jun 2009 09:45
11 lines
1246 bytes
toudidel@o2.pl pisze:
> On 6 Cze, 23:07, kornik <kor...@kornik.pl> wrote:
>> jaki powinien być warunek xpath aby np. wybrać wszystkie DIV-y
>> które mają atrybut zawierający tekst COS_
> 
> właśnie, kluczem są funkcje...
> 
> //div[starts-with(@class,'COS_')]
> --
> td
eureka !!!
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads