About the Load Files
There are two levels of XML files: the load file set and the object file. The load file set specifies the set of object files and the container to load the data into. The object file specifies the actual data of the objects to be loaded. The LoadFileSet utility expects the load file set as input, and the LoadFromFile utility expects object XML files as input.
Load File Set
A load file set specifies a set of object files and the container in which the objects are loaded into. The DTD file, WindchillLoad.dtd, for the load file set is located in the <Windchill>/codebase/wt/load/ directory. An example of the WindchillLoad.dtd is as follows:
<!ELEMENT loadFileList (loadFile*) >
<!ATTLIST loadFileList containerPath CDATA #IMPLIED >
<!ELEMENT loadFile EMPTY >
<!ATTLIST loadFile filename CDATA #REQUIRED
rbinfo CDATA #IMPLIED
key CDATA #IMPLIED
title CDATA #IMPLIED
token CDATA #IMPLIED
mapfile CDATA #IMPLIED
containerPath CDATA #IMPLIED >
LoadFileList XML Element
This XML element contains the list of object XML files to load (specified in loadFile elements). LoadFileList has an attribute of containerPath, which specifies the path of the container that the object files are to be loaded into.
It is highly recommended that you set this value. By agreement, the container path of Exchange (Site) container is / (a slash). For other containers, it has the form of /container-class=container-name/…/…
For example:
/wt.inf.container.OrgContainer=DefaultOrg/
wt.inf.library.WTLibrary=Windchill PDM

/wt.inf.container.OrgContainer=
pjl-qa/wt.projmgmt.admin.Project2=Project14
LoadFile Element
This element specifies the object files that to load in the target container. It is an empty tag with the following attributes:
filename—The name of the object file to be loaded. Its location is relative to the directory specified in wt.loadFiles property. The default value is $(wt.home)/loadFiles.
rbinfo—The location where resource information is stored for the particular file. Used by the handlers.
key—Localized title key.
token—An exception will not be thrown if token is specified, but it will be ignored.
mapfile—An exception will not be thrown if mapfile is specified, but it will be ignored.
containerPath
It is recommended that the set of objects to be loaded in a load set should all reside in a single container. However, you can specify an alternative containerPath that will cause the object in the current loadFile specification to go into a different container than the other LoadFile pointers in the set. You should set this element only in extraordinary circumstances.
Sample Load File Set
In the following load file set example, all the files are loaded into the exchange container:
<!DOCTYPE loadFileList SYSTEM "/wt/load/windchillLoad.dtd">
<loadFileList containerPath=”/ ”>
<loadFile filename="mydataformats.xml" title="data formats"/>
<loadFile filename="myadmin.xml" title="miscellaneous admin data
and access rules"/>
<loadFile filename="myworkflow.xml" title="workflow base data"/>
</loadFileList>
Sample Load File for Classification Node with Image
The following sample load file can be used to create a classification node with an image:
<?xml version="1.0"?>
<!DOCTYPE NmLoader SYSTEM "standardX20.dtd">
<NmLoader>
<csvClassificationImagesRootDir handler="wt.csm.navigation.ClassificationNodeLoader.getImageRootDirectory">
<csvimageDir>BASE_DIR_LOCATION</csvimageDir>
</csvClassificationImagesRootDir>
<csvBeginClassNode handler="wt.csm.navigation.ClassificationNodeLoader.beginCreateClassNode">
<csvstructureClassName>wt.part.WTPart</csvstructureClassName>
<csvnodeName>TestNode</csvnodeName>
<csvparentID>Electronic Parts\CAPACITOR\FIXED</csvparentID>
<csvdescription></csvdescription>
<csvimageFile>LOCATION HERE WOULD BE RELATIVE TO<csvimageDir>VALUE</csvimageFile>
<csvrefDefName>Part</csvrefDefName>
<csvinternalID></csvinternalID>
</csvBeginClassNode>
<csvEndClassNode handler="wt.csm.navigation.ClassificationNodeLoader.endCreateClassNode"/>
</NmLoader>
Object XML Files
An object file contains actual data for the objects that are loaded into the Windchill database. The DTD file for them is <Windchill>/loadXMLFiles/standardX20.dtd. It is strongly recommended that you validate an object XML file against this DTD before loading the data, because an invalid XML file will cause the load process to fail.
Sample Object File
An object XML file might look like this:
<?xml version="1.0" ?>
<!DOCTYPE NmLoader SYSTEM "standardX20.dtd">
<NmLoader>
<csvPreferenceInstance handler="wt.preference.LoadPreference.create
PreferenceInstance">
<csvname>/Display/ToolbarDescriptions</csvname>
<csvclientName>WINDCHILL</csvclientName>
<csvvalue>true</csvvalue>
<csvlock>false</csvlock>
</csvPreferenceInstance>
</NmLoader>
這是否有幫助?