Read BPMN file and generate SVG/PNG for a single element

I’m looking for some programmatic method (JavaScript) to read the BPMN file and for any single element recreate the image that is displayed or generated.

Here is a small segment of my BPMN file.

   <bpmn:userTask id="Task_1xlznse" name="Enter parts into BIP">
      <bpmn:documentation>Using AliExpress web site, copy and past information for each part into BIP entry form.  Try to match partsin other bins. up with similar parts </bpmn:documentation>
          <camunda:property name="order" value="32" />
          <camunda:property name="title" value="Enter each parts, deswcription link, prices, store bin location" />
          <camunda:property name="image" value="download.png" />
        <camunda:executionListener class="" event="start" />
      <bpmn:multiInstanceLoopCharacteristics isSequential="true" />

What I’m looking to get is the image in any format SVG/PNG that would be generated from that one element.



I think part of the solution is in BPMN-JS and one of the drawing libraries but my research has not been very productive.

Does my post in Enhanced BPMN automated Documentation ASCIIDoctor answer your question?