How to add BPMN field or properties to XML

i can use bpmnModeler.get(‘bpmnFactory’).create(‘bpmn:ExtensionElements’), but used this function to create field or properties is not work
For example, now I need to add field or properties ,Is there any way to achieve it

<bpmn:extensionElements >
    <properties>
        <value name="name" value="Li" />
    </properties>
    <field name="inParam"><string>request</string></field>
    <field name="inParam2"><class>request2</class></field>
</bpmn:extensionElements>

Where are the properties, value and field types coming from? I don’t see a namespace prefix.