View Single Post
Old 09-09-2013, 02:36 PM   #1
pksa
Junior Member
pksa began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Sep 2013
Device: kindle
xpath to select bookmarks

Hi,
I need to make table of contents for html file that refers to bookmarks. The problem is that it uses bookmark id in the bookmark itself.
Can you help me and make the following xpath expression more generic to makr all occurances of bookmark with any ID number.
see example

//*[name()='bookmark122' or name()='bookmark123' or name()='bookmark124']

and here is a part of html

<a name="bookmark122"></a>Wiara tratatata</span></p>
<p><span style="font-weight:bold;" class="font8">154</span><span class="font8">*text jalfkjdjfajd"</span><span style="font-weight:bold;" class="font8"> 18</span><span class="font8"> i wejście w ten sposób w wewnętrzną komunię z Nim.</span></p>
<p><span style="font-style:italic;" class="font8"> fafadfadfd</span><span class="font8"> -„dfadsafd</span><span style="font-weight:bold;" class="font8">"19.</span></p>
<p><span style="font-weight:bold;" class="font8"><a name="bookmark123"></a>Wiara i rozum</span></p>
pksa is offline   Reply With Quote