Get, manipulate, and update a SOAP API using XML

I have a complex use-case that is a bit beyond me I’m afraid - seeking help from experts to point me in the right direction!

I have an application that has a SOAP API where I can get and update data of an object in the app (in this case a building record). I want to read the data, replace certain fieldnames and values from mapped data in my scenario, then re-construct the XML to update it back into the app.

Here is an example of my data (from the getBuilding API):

I would like to be able to change items like the fieldName and value of a customField, then write the entire XML back using the SOAP API.

This is the end-state I need to perform an updateBuilding SOAP with replaced items from earlier mappings:

Any ideas how I could achieve this? Thanks in advance for any help :slight_smile: