|
|
#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 05: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="'), '"')
|
|
|
|
|
| Advert | |
|
|
![]() |
| Tags |
| xpath |
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Help with XPath Expression | a.o.advena | Conversion | 6 | 02-20-2017 07:28 AM |
| XPath Expression Coding | doylejohn | Calibre | 5 | 03-02-2015 08:33 PM |
| Xpath Expression list | JimLL | Conversion | 4 | 04-08-2012 03:29 PM |
| Xpath TOC Expression | Agama | Calibre | 2 | 07-12-2010 03:24 AM |
| XPath Expression wizard?? | tonyx3 | Calibre | 1 | 01-26-2010 05:49 AM |