Exporting and import XML

You can export project data to an XML, manipulate it externally, and feed the changes back to VP-UML. In this chapter, you will see how to export and import XML file through the command line interface.

Exporting XML

To export XML and images from a project through command line:

  1. Browse the scripts folder under the VP Suite installation directory.
    The scripts folder inside VP Suite installation directory
    The scripts folder inside VP Suite installation directory
  2. Copy the script file ExportXML and paste to the bin folder of VP Suite installation directory.
    Copy and paste ExportXML from scripts folder to bin folder
    Copy and paste ExportXML from scripts folder to bin folder
  3. Start the command prompt.
  4. Navigate to the bin folder of VP Suite installation directory.
    Navigate to the bin folder of VP Suite in command prompt
    Navigate to the bin folder of VP Suite in command prompt
  5. Execute the script by supplying the required parameters. For example:
    ExportXML -project C:\Demo\Demo.vpp -out C:\Demo\Output
    Executing ExportXML
    Executing ExportXML
    Below is a description of parameters:
    Parameter Description Example
    -project Project path
    C:\Demo\Demo.vpp
    -out Folder for storing the exported XML and images
    C:\Demo\Output
    -diagram One or more diagrams to be exported "Diagram A" "Diagram B"
    -noimage Do not export image files for diagrams N/A
    -refmodel Whether to embed referenced projects' content inline true
    Parameters for ExportXML

Importing XML

To import XML to a project through command line:

  1. Browse the scripts folder under the VP Suite installation directory.
    The scripts folder inside VP Suite installation directory
    The scripts folder inside VP Suite installation directory
  2. Copy the script file ImportXML and paste to the bin folder of VP Suite installation directory.
    Copy and paste ImportXML from scripts folder to bin folder
    Copy and paste ImportXML from scripts folder to bin folder
  3. Start the command prompt.
  4. Navigate to the bin folder of VP Suite installation directory.
    Navigate to the bin folder of VP Suite in command prompt
    Navigate to the bin folder of VP Suite in command prompt
  5. Execute the script by supplying the required parameters. For example:
    ImportXML -project C:\Demo\Demo.vpp -file C:\Demo\input\project.xml
    Executing ImportXML
    Executing ImportXML
    Below is a description of parameters:
    Parameter Description Example
    -project Project path
    C:\Demo\Demo.vpp
    -file The filepath of the XML file to import
    C:\Demo\input\sample.xml
    Parameters for ImportXML