Export Visio Diagram to XML in PHP

Aspose.Diagram - Exporting VSD to VDX

To Export VSD to VDX using Aspose.Diagram Java for PHP, call export_to_vdx method of ExportToXml module. Here you can see example code.

PHP Code

 public static function export_to_vdx($dataDir=null){

\# Call the diagram constructor to load diagram from a VSD file

$diagram = new Diagram($dataDir."drawing.vsd");

\# Save as VDX

$saveFileFormat=new SaveFileFormat();

$diagram->save($dataDir."Diagram.vdx", $saveFileFormat->VDX);

print "Exported visio diagram to VDX.".PHP_EOL;

}

Aspose.Diagram - Exporting VSD to VSX

To Export VSD to VSX using Aspose.Diagram Java for PHP, call export_to_vsx method of ExportToXml module. Here you can see example code.

PHP Code

 public static function export_to_vsx($dataDir=null){

\# Call the diagram constructor to load diagram from a VSD file

$diagram = new Diagram($dataDir."drawing.vsd");

\# Save as VSX

$saveFileFormat=new SaveFileFormat();

$diagram->save($dataDir."Diagram.vsx", $saveFileFormat->VSX);

print "Exported visio diagram to VSX.".PHP_EOL;

}

Aspose.Diagram - Exporting VSD to VTX

To Export VSD to VTX using Aspose.Diagram Java for PHP, call export_to_vtx method of ExportToXml module. Here you can see example code.

PHP Code

 public static function export_to_vtx($dataDir=null){

\# Call the diagram constructor to load diagram from a VSD file

$diagram = new Diagram($dataDir."drawing.vsd");

\# Save as VTX

$saveFileFormat=new SaveFileFormat();

$diagram->save($dataDir."Diagram.vtx", $saveFileFormat->VTX);

print "Exported visio diagram to VTX.".PHP_EOL;

}

Download Running Code

Download Export Visio Diagram to XML (Aspose.Diagram) from any of the below mentioned social coding sites: