How to generate desired XML, how XML works?

Hello guys,

I am looking for guidance to create complex XML

I have a situation where I need to create XML like

<bpmn2:serviceTask id="temp_090" name="temp_090">
	<camunda:field name="mapping">
			<camunda:mappingAttribute name="Address" value="abc" />
			<camunda:mappingAttribute  name="CareerStartDate" value="xyz"/>

So I want to generate such XML, how I can I achieve this.
Please suggest some guidance.

Which tools do you plan to employ to generate that XML?

I was just trying to understand the XML generation. It is only for my understanding. I really want to know how XML is generated and on upload BPMN file how diagram instance is created from same XML.