Page 1 of 1

Finding all id elements in a chapter

Posted: Fri Jun 11, 2021 2:02 pm
by mike004
Is there an easy way to find all the id elements in a chapter? And list them, if possible.
I have been using Search/Replace on a single chapter.
I tried using xpath such as //sect1[@id] to get all the id's in a sect1 element. But it returns too many hits.
What is the correct xpath for this, please?

Re: Finding all id elements in a chapter

Posted: Fri Jun 11, 2021 4:12 pm
by mike004
I got this working. It was easier than I expected:
XPath: //@id
Text to find: .*
Select "Regular Expression", deselect "Dot matches all"
Then do a Find All, right-click on the results and save to a *.txt file.
You can process the resulting file using Oxygen, to remove unwanted fields and info.