HomeGuidesAPILog In

XML (Extensible Markup Language) is a hierarchical plain text file format, that uses a pair of tags to encapsulate data. Tags use less than and greater than characters, with a / used to mark the end tag, e.g. <tag>data</tag>. Tags can be nested to define parent and child data structures. And XML Schema (XSD) file is used in conjunction with and XML file to provide additional control over the XML data structure.

Connector Set-Up

SmartIQ XML Data Source requires both an xml and xsd file. The XML file contains the data that will be used in projects and the XSD specifies filter and display fields used in Data Objects.

Example XML and XSD files

<?xml version="1.0" encoding="UTF-8"?>

<shiporder orderid="889923"
  <orderperson>John Smith</orderperson>
    <name>Ola Nordmann</name>
    <address>Langgt 23</address>
    <city>4000 Stavanger</city>
    <title>Empire Burlesque</title>
    <note>Special Edition</note>
    <title>Hide your heart</title>

<?xml version="1.0" encoding="UTF-8" ?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">

<!-- definition of simple elements -->
<xs:element name="orderperson" type="xs:string"/>
<xs:element name="name" type="xs:string"/>
<xs:element name="address" type="xs:string"/>
<xs:element name="city" type="xs:string"/>
<xs:element name="country" type="xs:string"/>
<xs:element name="title" type="xs:string"/>
<xs:element name="note" type="xs:string"/>
<xs:element name="quantity" type="xs:positiveInteger"/>
<xs:element name="price" type="xs:decimal"/>

<!-- definition of attributes -->
<xs:attribute name="orderid" type="xs:string"/>

<!-- definition of complex elements -->
<xs:element name="shipto">
      <xs:element ref="name"/>
      <xs:element ref="address"/>
      <xs:element ref="city"/>
      <xs:element ref="country"/>

<xs:element name="item">
      <xs:element ref="title"/>
      <xs:element ref="note" minOccurs="0"/>
      <xs:element ref="quantity"/>
      <xs:element ref="price"/>

<xs:element name="shiporder">
      <xs:element ref="orderperson"/>
      <xs:element ref="shipto"/>
      <xs:element ref="item" maxOccurs="unbounded"/>
    <xs:attribute ref="orderid" use="required"/>


Connection Attributes

Specify a default prefix with defaultPrefix= your_prefix
Specify use of namespaced attributes with legacyAttributes=1

Data Objects

Hierarchical XPath Data Object - Data Object Name / Definition should contain the data path separated by '' e.g. students\student