XML Packaging Utility

TestStand 2019 Help

Edition Date: May 2019

Part Number: 370052AA-01

»View Product Info
Download Help (Windows Only)

Use the XML Packaging Utility to copy local XML and HTML report files you select, including related style sheets, image files, and referenced files, to a destination directory you specify so you can view the XML report on a computer that does not have TestStand installed. You can launch the utility in the following ways:

  • Select Tools»Package XML/HTML Files for Distribution in the TestStand Sequence Editor.
  • (Windows 8.1) Click the NI Launcher tile on the Start screen and select TestStand»Tools»TestStand XML Packaging Utility.
  • (Windows 10 or 7) Select Start»All Programs»National Instruments»TestStand»Tools»TestStand XML Packaging Utility.

When you use the XML Packaging Utility to distribute XML, HTML, and supported versions of ATML reports that include hyperlinks, the utility also distributes the target file of the link if the XmlPack.ini file includes the file extension. You must run the utility at least once for TestStand to create the XmlPack.ini file, which is located in the <TestStand Application Data>\Cfg directory. Edit the COMMON_EXTENSIONS key of the XmlPack.ini file to include a comma-separated string of file extensions for files you want to distribute using the utility. For example, if you want to distribute .docx and .xlsx files, use "docx, xlsx" as the COMMON_EXTENSIONS key. TestStand distributes .tdms files by default.

Note Note  The utility packages only local files and not remote files that are referenced by the report files.

After the utility completes the packing, the selected and referenced files reside in the specified destination directory. The utility substitutes all file references to use the files copied to the destination directory. For distribution, you can compact, deliver, and extract the destination directory to view the copied files at the distribution location.

To package XML files, first click Add in the XML Packaging Utility dialog box and select one or more XML files to package. The files appear in the XML Files list. Use the Destination Folder control to specify the directory in which the utility copies the files to in the Destination Folder control. Click Pack to package the XML and other referenced files.

The XML Packaging Utility dialog box contains the following options:

  • XML Files—The XML files to be processed.
  • Add—Launches the Add XML files dialog box, in which you can specify the XML files to add to the XML Files list.
  • Remove—Deletes the file or files selected in the XML Files list.
  • Pack—Packages the files in the XML Files list and copies them to the directory the Destination Folder control specifies. When packaging completes, the Referenced Files list shows the packaged files. The utility stops packaging files if an error occurs during packaging.
  • Destination Folder—The directory in which the utility copies the packaged files. You can specify an existing directory or enter the path of a new directory for the utility to create. If the specified directory does not yet exist and you click Pack, the utility prompts you to confirm that you want to create it. If you do not confirm the creation of the new directory, the utility stops packaging the files.
  • Referenced Files (packaged)—After the utility completes the packaging process, this control lists the files the utility copies to the directory the Destination Folder control specifies. The utility renames any duplicate filenames using an incremental suffix and updates any reference to a duplicated name. If the packaging process fails, or if an XML file is added or removed, the list of packaged files is reset.
  • Referenced Objects (not packaged)—After the utility completes the packaging process, this control lists the objects the packaged files reference, such as ActiveX or Java class objects. The utility does not package these objects with the files but lists them in this control so you can verify that the objects exist in the destination directory. If an XML file is added or removed, the list of referenced objects is reset.
  • Exit—Closes the XML Packaging Utility dialog box.

When packaging the files, the utility displays the following icons to the left of the XML Files list and the Referenced Files list:

  • Checkmark—Indicates that the utility successfully parsed an XML file.
  • X—Indicates that an error occurred for the file.
  • Diamond—Indicates that an HTML file is not in XHTML format but the utility processed the file.

If no icon displays, the utility copied the file but did not process it.

Note Note  The XML Packaging Utility does not package the TsGraphControl2.ocx ActiveX control, located in the <National Instruments>\Shared\TestStand directory.
Note Note  The XML Packaging Utility does not require a license for build or analysis purposes, as defined by the License Agreement.

Command-Line Usage

You can execute the utility from the command line using the following syntax:

XMLPack [[-v] file-list [ file-list* ] dest-folder]

The following table describes the elements of this command-line syntax.

Syntax Element Description
-v Represents verbose mode, which displays messages.
file-list A valid directory or path and filename that can contain wildcard characters, such as * and ?.
dest-folder A valid directory or path, which might not exist. If it does not exist, TestStand creates it.

Square brackets contain optional command-line arguments. If you do not specify an argument, the dialog-based XML Packaging Utility launches.

When run from the command line, the utility returns an error code of 0 if successful and non-zero if an error occurred.

See Also

Displaying Array Data as Graphs


Not Helpful