Socket
Socket
Sign inDemoInstall

@neofreko/mxgraph2dot

Package Overview
Dependencies
20
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @neofreko/mxgraph2dot

drawio => dot => graphml


Version published
Weekly downloads
1
Maintainers
1
Install size
2.35 MB
Created
Weekly downloads
 

Readme

Source

Drawio to Graphml Converter

This is a solution to transform your drawio/diagram.net file to dot format. The ultimate intention for this project is to convert drawio file to graphml file (to be used with Graphwalker) To convert dot files to graphml, you can use different solution.

Using

This package exports:

  • getDotFromXmlString(xmlString, prefix)
  • getMxGraphXmlFromDrawIo(filePath, diagramIndex)
  • getMxGraphXmlsFromDrawIo(filePath)
  • getDotFromDrawIo(filePath, diagramIndex)
  • getAllDotsFromDrawIo(filePath)

Here an example to get .dot representation for a drawio file.

const fs = require("fs");
const mxgraph2dot = require('@neofreko/mxgraph2dot');

fs.readFile(__dirname + "/exported.xml", function(err, data) {
  if (err) 
    console.log(err)
  else
    mxgraph2dot.getDotFromXmlString(data).then(console.log);
});

FAQs

Last updated on 02 Nov 2021

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc