Custom Element Icon Deploymenet Error

I have Generated bpmn file from javaScript Moduler

here is my xml

<?xml version="1.0" encoding="UTF-8"?>
<bpmn:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:cp="http://some-company/schema/bpmn/cp" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn"><bpmn:process id="Process_1" isExecutable="false"><bpmn:startEvent id="StartEvent_1" /><cp:cPResource id="CPResource_0tbxfze" /></bpmn:process><bpmndi:BPMNDiagram id="BPMNDiagram_1"><bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Process_1"><bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1"><dc:Bounds x="173" y="102" width="36" height="36" /></bpmndi:BPMNShape><bpmndi:BPMNShape id="CPResource_0tbxfze_di" bpmnElement="CPResource_0tbxfze"><dc:Bounds x="503" y="204" width="100" height="80" /></bpmndi:BPMNShape></bpmndi:BPMNPlane></bpmndi:BPMNDiagram><
/bpmn:definitions>

when i am deploying using the rest api

it gives

 Invalid content was found starting with element 'cp:cPResource'. One of '{"http://www.omg.org/spec/BPMN/20100524/MODEL":flowElement, "http://www.omg.org/spec/BPMN/20100524/MODEL":artifact, "http://www.omg.org/spec/BPMN/20100524/MODEL":resourceRole, "http://www.omg.org/spec/BPMN/20100524/MODEL":correlationSubscription, "http://www.omg.org/spec/BPMN/20100524/MODEL":supports}' is expected. | 20180529T083439013Z.bpmn | line 2 | column 500

I think the XML you posted is not valid according to the BPMN 2.0 XML schema.

Cheers,
Thorben

its not valid since i have used some custom Element ,xml genrated on that way

Okay, you’ll have to make sure to generate valid XML then. In BPMN there is a concept called extension elements, which can be a child element of (almost?) any other element in which you can place arbitrary XML elements. See the BPMN specification for details (e.g. section 8.3.3).

can i get any sample reference which will deploy Custom element on Camunda Server

Here is a BPMN file that contains extension elements: https://github.com/camunda/camunda-bpm-examples/blob/master/bpmn-model-api/parse-bpmn/src/test/resources/process.bpmn. Your XML must deal with custom elements in the same way.