Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre > Conversion

Notices

Reply
 
Thread Tools Search this Thread
Old 09-09-2013, 03: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
Old 09-09-2013, 11:28 PM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 26,323
Karma: 5382313
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
//*[starts-with(@name, "bookmark")]
kovidgoyal is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Need help with XPath NASCARaddicted ePub 12 04-25-2010 06:20 AM
XPath Expression wizard?? tonyx3 Calibre 1 01-26-2010 05:49 AM
XPath question krischik Calibre 0 01-16-2010 09:22 AM
XPath Help and Pagebreak emellaich Calibre 3 07-28-2009 03:17 PM
XPath query amjbrown Calibre 2 05-10-2009 07:04 PM


All times are GMT -4. The time now is 05:12 PM.


MobileRead.com is a privately owned, operated and funded community.