File Exchange > Data Connector >    XML Connector

Author:
OriginLab Technical Support
Date Added:
3/8/2019
Last Update:
5/7/2024
Downloads (90 Days):
593
Total Ratings:
1
File Size:
19 KB
Average Rating:
File Name:
XML Connector.opx
File Version:
1.22
Minimum Versions:
License:
Free
Type:
App
Summary:

Connect the Origin project to an XML file from a file or web site.

Screen Shot and Video:
Description:

  • Installation
    • This App is pre-installed in Origin. You can launch it from the Data menu or from the App icon on the Connectors tab of the Apps Gallery, located at the right-side of the Origin workspace.
    • If you do not see the menu command or App icon, click Data: Connect to File: Add New.... The App Center opens listing only Connector Apps. Click the Download and Install button to install an App.

 

  • Features
    • Data Connector Browser

      In this browser, you can preview the tree structure of the connected XML file in the top left panel. If any line is selected from the top left panel, any attribute that belongs to this node shows in the right panel as key value pair (attribute name and value). You can double click any line on the tree structure, or select one line and then click the down arrow button, so to add this line to the bottom left panel, which means that you are going to import this node into Origin worksheet. Click OK button, then the related data is imported and a data connector icon will show on the top left corner of the worksheet. You can click this icon again, and then select "Select..." from the context menu to open this browser again.
    • Select Node for Import
      Currently, only if the node contains multiple sub nodes with the same node name can be imported. And you can check this in the preview of tree structure, if the node has a square brackets with something like numbers, this node and its parent node(s) are valid for imported.
    • Nested Arrays as Columns
      The difference between checked and not checked this checkbox can be shown by a simple example. The XML file is like:
      <?xml version="1.0"?>
      <books>
      	<book id="bk1" sbn="sbn1">
      		<press>press1</press>
      		<author>author1</author>
      		<title>book1</title>
      		<descriptions>
      			<description>description1</description>
      			<description>description2</description>
      			<description>description3</description>
      		</descriptions>
      		<price unit="usd">10.2</price>
      	</book>
      	<book id="bk2" sbn="sbn2">
      		<press>press2</press>
      		<author>author2</author>
      		<title>book2</title>
      		<descriptions>
      			<description>description4</description>
      			<description>description5</description>
      			<description>description6</description>
      		</descriptions>
      		<price unit="rmb">64.22</price>
      	</book>
      </books>
      

      The result comparison of importing books node shows below:

  • Basic Usage
    1. With the worksheet active, click on the Data menu. If you are connecting to a file on your PC or network, click Connect to File: XML and open your file. If you are connecting to a web file, choose Data: Connect to Web and enter a URL and click OK.  In the Data Connector Browser dialog, double click on the contents to select your data. Check Nested Array as Columns if necessary, then click OK.
    2. Once a connector is added, click the connector icon in the upper-left corner of the workbook for a popup menu with various commands.
    3. By default, connector-imported data are NOT saved with the project file. To save a workbook's data with the project file, click the connector icon in the upper-left corner for that workbook and uncheck Exclude Imported When Saving. Note that each workbook has its own Exclude setting.

Updates:

v1.22 5/7/2024 Fixed bug of Connect by Duplicating Active Sheet.
v1.21 10/31/2022 Supported to import meta data.
v1.01 5/26/2020 Fixed reimport bug.

Reviews and Comments:
08/29/2024william_lin