如何将json数据拼成符合jpdl要求的XML

{"states":{"rect1":{"id":"rect1","type":"start","text":{"text":"开始"}, "attr":{ "x":247, "y":14, "width":50, "height":50}, "props":{"text":{"value":"开始"},"temp1":{"value":""},"temp2":{"value":""}}},"rect2":{"id":"rect2","type":"end","text":{"text":"结束"}, "attr":{ "x":607, "y":16, "width":50, "height":50}, "props":{"text":{"value":"结束"},"temp1":{"value":""},"temp2":{"value":""}}},"rect3":{"id":"rect3","type":"task","text":{"text":"提交申请"}, "attr":{ "x":219, "y":121, "width":100, "height":50}, "props":{"text":{"value":"提交申请"},"assignee":{"value":""}}},"rect4":{"id":"rect4","type":"task","text":{"text":"审批任务1"}, "attr":{ "x":114, "y":302, "width":100, "height":50}, "props":{"text":{"value":"审批任务1"},"assignee":{"value":""}}},"rect5":{"id":"rect5","type":"task","text":{"text":"审批任务2"}, "attr":{ "x":344, "y":300, "width":100, "height":50}, "props":{"text":{"value":"审批任务2"},"assignee":{"value":""}}},"rect6":{"id":"rect6","type":"fork","text":{"text":"分支"}, "attr":{ "x":243, "y":207, "width":50, "height":50}, "props":{"text":{"value":"分支"}}},"rect7":{"id":"rect7","type":"join","text":{"text":"合并"}, "attr":{ "x":244, "y":399, "width":50, "height":50}, "props":{"text":{"value":"合并"}}},"rect8":{"id":"rect8","type":"task","text":{"text":"审批任务3"}, "attr":{ "x":407, "y":400, "width":100, "height":50}, "props":{"text":{"value":"审批任务3"},"assignee":{"value":""}}},"rect9":{"id":"rect9","type":"task","text":{"text":"审批任务4"}, "attr":{ "x":583, "y":403, "width":100, "height":50}, "props":{"text":{"value":"审批任务4"},"assignee":{"value":""}}},"rect10":{"id":"rect10","type":"task","text":{"text":"审批任务5"}, "attr":{ "x":582, "y":201, "width":100, "height":50}, "props":{"text":{"value":"审批任务5"},"assignee":{"value":""}}}},"paths":{"path11":{"from":"rect1","to":"rect3", "dots":[],"text":{"text":"TO 提交申请"},"textPos":{"x":0,"y":-10}, "props":{"text":{"value":""}}},"path12":{"from":"rect3","to":"rect6", "dots":[],"text":{"text":"TO 分支"},"textPos":{"x":0,"y":-10}, "props":{"text":{"value":""}}},"path13":{"from":"rect6","to":"rect4", "dots":[{"x":164,"y":231}],"text":{"text":"TO 审批任务1"},"textPos":{"x":18,"y":-15}, "props":{"text":{"value":"TO 审批任务1"}}},"path14":{"from":"rect6","to":"rect5", "dots":[{"x":393,"y":231}],"text":{"text":"TO 审批任务2"},"textPos":{"x":4,"y":-15}, "props":{"text":{"value":"TO 审批任务2"}}},"path15":{"from":"rect4","to":"rect7", "dots":[{"x":162,"y":426}],"text":{"text":"TO 合并"},"textPos":{"x":5,"y":-16}, "props":{"text":{"value":"TO 合并"}}},"path16":{"from":"rect5","to":"rect7", "dots":[],"text":{"text":"TO 合并"},"textPos":{"x":0,"y":-10}, "props":{"text":{"value":""}}},"path17":{"from":"rect7","to":"rect8", "dots":[],"text":{"text":"TO 审批任务3"},"textPos":{"x":0,"y":-10}, "props":{"text":{"value":""}}},"path18":{"from":"rect8","to":"rect9", "dots":[],"text":{"text":"TO 审批任务4"},"textPos":{"x":0,"y":-10}, "props":{"text":{"value":""}}},"path19":{"from":"rect9","to":"rect10", "dots":[],"text":{"text":"TO 审批任务5"},"textPos":{"x":0,"y":-10}, "props":{"text":{"value":""}}},"path20":{"from":"rect10","to":"rect2", "dots":[],"text":{"text":"TO 结束"},"textPos":{"x":0,"y":-10}, "props":{"text":{"value":""}}},"path21":{"from":"rect8","to":"rect10", "dots":[],"text":{"text":"TO 审批任务5"},"textPos":{"x":0,"y":-10}, "props":{"text":{"value":""}}}},"props":{"props":{"name":{"value":"新建流程"}}}}

现在有这样一份数据 想要把这个数据动态拼接成符合JPDL要求的XML 请问应该如何拼接

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问
相关内容推荐