Use > Knowledge Management > Knowledge Management administration > Knowledge Management migration > XML file specification for Knowledge Management migration

XML file specification for Knowledge Management migration

The KMMigrate script file processes the XML data file that you want to import into HPE Service Manager. This script expects the data to be in the XML format specified.

There is no DTD for the XML data being imported because the elements can be any column name in any Service Manager table. This XML file specification is important if you edit the XML files to include any customized fields that you might have added and you want to import to the Knowledge Management application in Service Manager.

All required fields must be defined for a table element, or the imported records cannot be inserted into the Service Manager database. The records can all be in the same file or in separate files. For example, the multiple usersAndContactsN.xml files can each hold 1000 users.

The root document element is <migrationdoc> and it must be the parent element of all table elements and record elements.

		<migrationdoc>
.
.
.
</migrationdoc>

Each element tag within the <migrationdoc> tag must be the name of a Service Management table.

<migrationdoc>
	<contacts>
		<contact.name _type="Text"><![CDATA[owner,otto]]></contact.name>
		<user.id _type="Text"><![CDATA[1296]]></user.id>
		<full.name _type="Text"><![CDATA[owner,otto]]></full.name>
		<email _type="Text"><![CDATA[oowner@hp.com]]></email>
		<contact.phone _type="Text"><![CDATA[858.792.3416]]></contact.phone>
		<operator.id _type="Text"><![CDATA[oowner]]></operator.id>
	 </contacts>
		.
.
.
</migrationdoc>

Each element within the table element must be the name of a text, boolean, or decimal data field or the name of an Array or ArrayStructure in the record. A data field has an attribute of _type="Text", _type="Boolean", or _type="Decimal".
The actual data value can be enclosed in a CDATA tag.

<email _type="Text"><![CDATA[oowner@hp.com]]></email>
<login.revoked_type="Boolean"><![CDATA[false]]></login.revoked>
<msglog.lvl _type="Decimal"><![CDATA[1]]></msglog.lvl> 

The actual data value can also appear as plain text, if it has no special characters in it.

<email _type="Text">oowner@hp.com</email>
<login.revoked _type="Boolean">false</login.revoked>
<msglog.lvl _type="Decimal">1</msglog.lvl>

An element within a table that is an Array is imported into the kmgroup table as follows:

<operators _type="Array">
	<operators _type="Text"><![CDATA[jowens]]></operators>
	<operators _type="Text"><![CDATA[rtillman]]></operators>
	<operators _type="Text"><![CDATA[ssmith]]></operators>
</operators>

An element within a table that is an ArrayStructure is imported into the kmcategory table as follows:

<permission _type="ArrayStructure">
	<kmprofile _type="Text"><![CDATA[KMP005]]></kmprofile>
	<kmgroup _type="Text"><![CDATA[KMG02]]></kmgroup>
</permission>