Basically you could use the jsUML2 to draw the SysML diagram and then use the export function to produce the XML. It depends on d3 and dagre-d3 for providing the graphical layout and drawing libraries.
Diagramjs Core library for creating and displaying diagrams.
D3 js uml diagram. An example class diagram using D3js – Data-Driven Documents. Creately diagrams can be exported and added to Word PPT powerpoint Excel Visio or any other document. It mainly covers sequence diagrams and flowcharts.
Since SysML is a UML2 profile you might find jsUML2 a useful starting point for your attempts. It offers an online editor but you can also directly reuse the packaged Mermaid API to integrate Mermaid in your own developments. You can edit this template on Createlys Visual Workspace to get started quickly.
D3js sequence diagram. Use Createlys easy online diagram editor to edit this diagram collaborate with others and export results to multiple image formats. We were unable to load the diagram.
D3–You can edit this template and create your own diagram. Use PDF export for high quality prints and SVG export for large sharp images or embed your diagrams. You can see this example at httpshnakamurgithubiod3js-class-diagram-example or httphnakamurgithubiod3js-class-diagram-example.