jenkins job config.xml

I have a jenkins job config.xml file, this is the template file, which will be replaced with the values from another yml file and next it has to create a jenkins job out of it. I am trying to figure out the best way to replace the values with the values from pipleine.yml file. could some one suggest better options.

https://docs.ansible.com/ansible/latest/collections/community/general/xml_module.html

Thank you, by using the above module I am able to replace with the required value in one location, what if I want to replace with my required value in other locations in the same config.xml file?

Please use template module - https://docs.ansible.com/ansible/latest/collections/ansible/builtin/template_module.html to create a new pipeline.yml and then create jobs accordingly.

Thankyou Abhijeet, template module helped solve my issue. But as of now I am passing variables as --extra-vars to the command but I am looking for something where I can pass those variables with in the playbook instead of passing them manually.
the variables are output of above task in the same playbook.