Using substring-after in XPath node

Dear all,
I have a quite basic question with xpath.
With this (very simplified file) xml file :

<?xml version="1.0" encoding="UTF-8"?>

(PPN)229067271

I look for a xpath expression to extract only the number after (PPN).
something like /dns:subfield[substring-after(text(),‘(PPN)’)] but i don’t know the exact syntax to do this kind of calculation.
Best regards,
Joël

Hi @JPollet , I’m assuming that you intended to upload some actual xml.

When uploading code fragments or xml, it’s best to highlight the text then press the “Pre-formatted text” button
11d5503b08ec183b45f5dba941354751db770f33

as this then stops the forum software changing anything and then others can read it.

Perhaps you can add it again so that people can assist you.

1 Like

I found the solution which is simply and basic : substring-after(/dns:subfield,‘(PPN)’)).

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.