mavrosxristoforos / get-xml-info

Get Information from XML files to use into your GitHub workflows
GNU General Public License v3.0
6 stars 13 forks source link

Make it work for string-typed xpath expressions #20

Closed m-ringler closed 8 months ago

m-ringler commented 8 months ago

Sorry. Old PR #19 got closed after I renamed my repo and branch.

Hi @m-ringler and thank you for your contribution! Could you please also provide an example of your XML?

Sure, this is the full beauty

net7.0 latest enable True enable true $(MSBuildThisFileDirectory)CodeAnalysis.ruleset True true 1.0.0 alpha.21

Only the Version elements are relevant - so you can strip everything else if you are looking for a minimal repro case. Evaluating the XPath expression concat(//VersionPrefix/text(), "-", //VersionSuffix/text()) against this document should produce the string 1.0.0-alpha.21. See e. g. https://www.freeformatter.com/xpath-tester.htm

m-ringler commented 8 months ago

Using another branch for the PR