If your input is XML schema and you want your output also in XML schema then you can use transform, which is also known as a map, consists of a Source XML schema (the input) and a Target XML schema (the output). You can use different built-in functions to help manipulate or control the data, including string manipulations, conditional assignments, arithmetic expressions, date time formatters, and even looping constructs. You can refer to this article for more details
You can always do XML validation before any processing as it will validate the incoming message against the schema you created in the Integration Account.
Once you have done the validation you can use "Transform XML" to perform any of the processing in your XML.
Hope the above helps and let me know if you have any queries
Please 'Accept as answer' and ‘Upvote’ if it helped so that it can help others in the community looking for help on similar topics.