I have a XML file like the below :-
<?xml version="1.0" encoding="UTF-8"?>
<properties>
<Targets>
<Target>
<branch>develop</branch>
<env>dev</env>
</Target>
<Target>
<branch>master</branch>
<env>prod</env>
</Target>
</Targets>
</properties>
Now i would like to read the values for the first branch and second branch as well as the first env and second env from this file in a scripted Jenkinsfile (groovy). Is there a way to parse this XML and then extract the actual values in the groovy scripted Jenkinsfile for both branch and env?