Preparing an XML file for the import process
Before importing data into an IBM® Content Manager OnDemand system, you need to have an XML file that contains all the data that needs to be imported. The XML file can be either created during a previous XML export process or created manually. If you decide to develop an XML file manually, you must follow the format of the Content Manager OnDemand XML schema file.
The Content Manager OnDemand XML schema file defines the syntactic format for all OnDemand XML files, and is used during the import process to validate the contents of the import XML file. For different objects, the schema file specifies which fields are required and which fields are optional. Also, the schema file can establish a list of valid values for certain fields.
The following sample is a portion of the Content Manager OnDemand schema
file for the object user:
<xs:element name="user">
<xs:complexType>
<xs: choice maxOccurs="unbounded">
<xs:element name="userPermission" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:attribute name="task" type="taskString" use="optional"/>
<xs:attribute name="user" type="nameString" use="optional"/>
<xs:attribute name="group" type="nameString" use="optional"/>
<xs:attribute name="userAuthority" type="authString" use="optional"
default="Access"/>
</xs:complexType>
</xs:element>
</xs:choice>
<xs:attribute name="name" type="nameString" use="required"/>
<xs:attribute name="uid" type="xs:integer" use="optional"/>
<xs:attribute name="description" type="descString" use="optional"/>
<xs:attribute name="password" type="passwordString" use="optional"/>
<xs:attribute name="fullName" type="userMiscString" use="optional"/>
<xs:attribute name="acctInfo" type="userMiscString" use="optional"/>
<xs:attribute name="company" type="userMiscString" use="optional"/>
<xs:attribute name="title" type="userMiscString" use="optional"/>
<xs:attribute name="addr1" type="userMiscString" use="optional"/>
<xs:attribute name="addr2" type="userMiscString" use="optional"/>
<xs:attribute name="addr3" type="userMiscString" use="optional"/>
<xs:attribute name="addr4" type="userMiscString" use="optional"/>
<xs:attribute name="dept" type="userMiscString" use="optional"/>
<xs:attribute name="building" type="userMiscString" use="optional"/>
<xs:attribute name="room" type="userMiscString" use="optional"/>
<xs:attribute name="phone" type="phoneString" use="optional"/>
<xs:attribute name="fax" type="phoneString" use="optional"/>
<xs:attribute name="coverPage" type="userMiscString" use="optional"/>
<xs:attribute name="printer" type="xs:string" use="optional"/>
<xs:attribute name="timeOut" type="xs:string" use="optional"/>
<xs:attribute name="email" type="emailString" use="optional"/>
<xs:attribute name="userType" type="userTypeString"
use="optional" default="User"/>
<xs:attribute name="createFoldersAuth" type="yesnoString"
use="optional" default="No"/>
<xs:attribute name="createUsersAuth" type="yesnoString"
use="optional" default="No"/>
<xs:attribute name="createGroupsAuth" type="yesnoString"
use="optional" default="No"/>
<xs:attribute name="createAppGroupsAuth" type="yesnoString"
use="optional" default="No"/>
</xs:complexType>
</xs:element>
The following sample is a portion of the Content Manager OnDemand schema
file for the object group:
<xs:element name="group">
<xs:complexType>
<xs:choice maxOccurs="unbounded">
<xs:element name="user" maxOccurs="unbounded">
<xs:complexType>
<xs:attribute name="task" type="taskString" use="optional"/>
<xs:attribute name="name" type="nameString" use="required"/>
</xs:complexType>
</xs:element>
</xs:choice>
<xs:attribute name="name" type="nameString" use="required"/>
<xs:attribute name="gid" type="xs:integer" use="optional"/>
<xs:attribute name="description" type="descString" use="optional"/>
<xs:attribute name="ownerUser" type="nameString" use="optional"/>
<xs:attribute name="ownerGroup" type="nameString" use="optional"/>
</xs:complexType>
</xs:element>
The following example is a portion of the Content Manager OnDemand XML
file, which contains a Content Manager OnDemand administrative user named
bill and a user group named SpecialGroup.
SpecialGroup is owned by the user
admin
, and contains a single
user
bill.<user name="bill"
password=""
description="This is an Admin user."
email="Sample@us.ibm.com"
userType="User Admin">
</user>
<group name="SpecialGroup"
description="A Special Group for special users"
ownerUser="admin">
<user name="bill"/>
</group>