Visio drawings are used to create different diagrams like flowcharts, process diagrams, etc. Likewise, XAML is a declarative markup language that is used to create user interfaces. In some scenarios, you may need to convert a VSD or VSDX Visio to XAML format. In accordance with similar use cases, this article covers how to convert a VSD or VSDX file to a XAML file in Java.
- Visio to XAML File Converter – Java API Installation
- Convert VSD Visio File to XAML Programmatically in Java
- Convert VSDX to XAML File in Java
Visio to XAML File Converter – Java API Installation
Aspose.Diagram for Java API supports working with VSD, VSDX, and other Visio formats. You do not need to install any 3rd party tool to work with Microsoft Visio files in your application. Simply download its JAR file from the New Releases or install it from Aspose Repository with the below configurations in the pom.xml file:
Repository
<repositories>
<repository>
<id>AsposeJavaAPI</id>
<name>Aspose Java API</name>
<url>http://repository.aspose.com/repo/</url>
</repository>
</repositories>
Dependency
<dependencies>
<dependency>
<groupId>com.aspose</groupId>
<artifactId>aspose-diagram</artifactId>
<version>22.3</version>
<classifier>jdk16</classifier>
</dependency>
</dependencies>
Convert VSD Visio File to XAML Programmatically in Java
You need to follow the steps below to convert a VSD Visio file to XAML format:
- Load the input VSD file using an object of the Diagram class.
- Convert the input file to XAML format with the Save method.
The code snippet below demonstrates how to convert a VSD Visio file to XAML format programmatically in Java:
Convert VSDX to XAML File in Java
You can convert a VSDX file to XAML format with the steps below:
- Create an object of the Diagram class to load the source VSDX file.
- Convert the loaded VSDX file to XAML format.
The code sample below elaborates on how to convert a VSDX file to XAML format programmatically in Java:
Get a Free License
You can test the API in its full capacity by requesting a free temporary license.
Conclusion
In this article, you have inspected how to convert a VSD or VSDX Visio file to XAML format programmatically in Java. Furthermore, you may check out the other features offered by the API by taking a look at the documentation. In case of any concerns, you can write to us at the forum.