Finding all id elements in a chapter

<oXygen/> general issues.
mike004
Posts: 13
Joined: Fri Feb 18, 2011 2:29 pm

Finding all id elements in a chapter

Post by mike004 » Fri Jun 11, 2021 2:02 pm

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?

mike004
Posts: 13
Joined: Fri Feb 18, 2011 2:29 pm

Re: Finding all id elements in a chapter

Post by mike004 » Fri Jun 11, 2021 4:12 pm

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.

Post Reply