![]() |
#1 |
Connoisseur
![]() ![]() ![]() Posts: 79
Karma: 228
Join Date: Aug 2014
Device: lambda k21
|
Help about xpath expression
In some search operations in calibre one can use an xpath expression to get the values for particular tags, i.e. the following expression:
Code:
//h:div[re:test(@class, "figbox", "i")] Code:
<div class="figbox">Volterra</div> Now, with the following processing-instructions Code:
<?bag value="2" content="Volterra"?> <?bag value="3" content="Ferrara"?> EDIT =============================== I've tried putting in a book the following line Code:
<?bag value="3" content="Ferrara"?> Code:
//processing-instruction("bag")[@value="3"]/@content Code:
"calibre, version 3.30.0 ERROR: No items found: No items were found that could be added to the Table of Contents. ss Last edited by Sam Sahara; 08-31-2018 at 04:24 PM. |
![]() |
![]() |
![]() |
#2 | |
Connoisseur
![]() ![]() ![]() Posts: 79
Karma: 228
Join Date: Aug 2014
Device: lambda k21
|
Quote:
Code:
substring-before(substring-after(//processing-instruction('bag'), 'value="3" content="'), '"') |
|
![]() |
![]() |
![]() |
Tags |
xpath |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Help with XPath Expression | a.o.advena | Conversion | 6 | 02-20-2017 06:28 AM |
XPath Expression Coding | doylejohn | Calibre | 5 | 03-02-2015 07:33 PM |
Xpath Expression list | JimLL | Conversion | 4 | 04-08-2012 02:29 PM |
Xpath TOC Expression | Agama | Calibre | 2 | 07-12-2010 02:24 AM |
XPath Expression wizard?? | tonyx3 | Calibre | 1 | 01-26-2010 04:49 AM |