Xml file parse with jackson.dataformat.xml


           JacksonXmlModule xmlModule = new JacksonXmlModule();
            ObjectMapper objectMapper = new XmlMapper(xmlModule);
            pojo = objectMapper.readValue(getXmlString(), definitions.class);

Example objects

public final class process
    public String id;
    public startEvent startEvent;
    public List<exclusiveGateway> exclusiveGateway;
    public List<sequenceFlow> sequenceFlow;
    public List<userTask> userTask;
    public endEvent endEvent;
    public boolean isExecutable;


I was able to parse the xml file, but There is only one element in the sequenceFlow, exclusiveGateway list. Has anyone parsed the xml that bpmn.io generates?`

Hi @kypdk ,

so if I get it correctly, you are trying to parse a BPMN XML with Jackson but experience issues doing that.

Has anyone parsed the xml that bpmn.io generates?`

bpmn.io generates OMG BPMN 2.0 compliant BPMN XML, so this parsing problem should not be related to bpmn.io, but more to the usage of Jackson I would assume.

Hence I would recommend that you reach out to the Jackson community for assistance (e.g., GitHub - FasterXML/jackson: Main Portal page for the Jackson project).


1 Like

Hi @kypdk,

there is a Model API that helps to read and write BPMN Models with Java: BPMN Model API | docs.camunda.org

Hope this helps, Ingo