Using this xpath exercise code:
<datasource formatted-name='Activity' inline='true' source-platform='win' version='18.1' xmlns:user='http://www.tableausoftware.com/xml/user'>
<column datatype='integer' name='[Number of Records]' role='measure' type='quantitative' user:auto-column='numrec'>
<calculation class='tableau' formula='1' />
</column>
</datasource>
I want to extract @name, but only if the attribute user:auto-column exists.
All I could come up with is:
//column[@auto-column]/@name//column[@user:auto-column]/@name//column[@auto-column=user:column[@auto-column]]/@name
The 1st one worked in only one of xpath testers I found online, the rest of them didn't work at all.
I have looked everywhere I could (read questions here on stackoverflow, checked out tutorials/documentation/questions on w3schools, microsoft, ibm, xpath testers, tutorials and cheetsheets) and tried to solve for hours.
How can I select the @name of column elements that have @user:auto-column?