Create custsom element tags in XML file

I am currently having the plain XML file without any diagram included in it.

<?xml version="1.0" encoding="UTF-8"?>
<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn">
  <bpmn:process id="Process_1" isExecutable="false" />
  <bpmndi:BPMNDiagram id="BPMNDiagram_1">
    <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Process_1" />
  </bpmndi:BPMNDiagram>
</bpmn:definitions>

I have added my own custom elements and dragged and dropped into the modeler. But, the custom elements are not getting added to the XML.

The questions I have are

  1. Is it possible to add the added custom elements in the XML file.
  2. Which file of the custom elements project (https://github.com/bpmn-io/bpmn-js-examples/tree/master/custom-elements) should i look at to add the custom elements to the XML.

Which custom tags did you add? Where did you add them?

With all extensions you make you have to stay compliant with the BPMN 2.0 XML schema.

I have added the elements in custom-elements.json file.

How can one conform that the extensions are compliant with BPMN 2.0 XML Schema. Is there any document for that ?

Please be specific what you added and how. Show examples!