Page 1 of 1

combine (concat) two XPATH (path(.) and the text())

Posted: Tue Jun 05, 2018 8:56 am
by mariomueller
Hi all,

I got two XPATH wich I which to concat
You can use the XML on https://www.w3schools.com/xml/books.xml

First XPATH gives back the Path of the nodes

Code: Select all

/bookstore/book/author/path(.)
Second XPATH gives back values

Code: Select all

/bookstore/book/author/text()
Is it possible to concat the results of both XPATH?

Many Thanks
Regards
Mario

Re: combine (concat) two XPATH (path(.) and the text())

Posted: Tue Jun 05, 2018 9:31 am
by HomeGoods
You mean something this?

Code: Select all

/bookstore/book/author/(path() || text())

Re: combine (concat) two XPATH (path(.) and the text())

Posted: Tue Jun 05, 2018 12:17 pm
by mariomueller
Hi,

thanks. Works fine!
Regards
Mario