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 >
        <value name="name" value="Li" />
    <field name="inParam"><string>request</string></field>
    <field name="inParam2"><class>request2</class></field>

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