Enhanced BPMN automated Documentation ASCIIDoctor

Hey,

answering your two questions:

  1. That is what bpmn-js does when importing a BPMN diagram. You can simply retrieve your element from the element registry and access its business properties through its business object:
var modeler = new Modeler({
  // ...
});

modeler.importXML(xml, function(err, warnings) {
  var elementRegistry = modeler.get('elementRegistry');
  
  var myElement = elementRegistry.get('myElement').businessObject;

  // ...
});
  1. You can only export the entire diagram using #saveXML. However, you can use the element registry to get an elements SVG, too:
var myElementGraphics = elementRegistry.getGraphics('myElement');

// ...

You could use that as a starting point for building a saveElementSVG functionality.

Hope that helps.