View Single Post
Old 02-23-2023, 11:40 AM   #1
hihohahi
Junior Member
hihohahi began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Feb 2023
Device: none
Concat 2 xpath results

Hello,

My start of my chapter looks like this. This I cannot change.
<p class="Chapter">Chapter 1 </p>
<p class="ChapterName">ABCDEF</p>

And when I make the TOC, I can only match one of them and have to fill the other by hand.
This has bugged me for a long time. Is there a way to concatenate the results from 2 xpath?

I want something like this
concat(//*[contains(@class, 'Chapter')], //*[contains(@class, 'ChapterName')])
would return No items found: No items were found that could be added to the Table of Contents.

Thanks so much for reading.
hihohahi is offline   Reply With Quote