Modifying Data Files
The data file is used to provide the load with data. This section outlines the steps required to modify XML data files. There are two methods to choose from.
Method 1: Modifying XML Load Files Directly
Before you begin the following procedure, ensure that you have XMLSpy or another XML editor that can validate the XML against a DTD.
1. Make your changes to the \Windchill\loadFiles\csvmapfile.txt file.
2. Add the required DTD elements to the csvmap.dtd and generate the runtime validation DTD through the wt.load.util.UpdateEditDTDUtility.
The runtime DTD is generated in the following location: <Windchill>\codebase\registry\ixb\dtds\standardX20.dtd. Your changes are propagated to the <Windchill>\loadXMLFiles\standardX20.dtd file.
For more information, see the section About UpdateEditDTDUtility in Validating the XML Format.
* 
The csvmapfile.dtd file is a partial DTD and therefore cannot be used for validation. To obtain DTD file for validation, run Windchill wt.load.util.UpdateEditDTDUtility.
3. Using an XML editor, make changes to the XML data files and validate them against the DTD that you obtained in step 2.
Method 2: Modifying CSV Files and Propagating Changes to XML and DTD Files
With this approach, you work with the CSV files and use automated tools to generate XML load files and the DTD file.
Propagating Changes to XML and DTD
1. Make your changes to the CSV data file.
2. Make your changes to \Windchill\loadFiles\csvmapfile.txt.
3. Modify the csvmapfile.dtd as required based on your changes.
4. Run the following utility to update the /loadXMLFiles/standardX20.dtd file to reflect your changes:
windchill wt.load.util.UpdateEditDTDUtility
5. Run the following utility to generate XML load files:
windchill wt.load.util.CSV2XML -input [optional] -output [optional] -root [optional] -h [optional] -encoding [optional] -mapfile <absolute path of the csvmapfile.txt> -delimiter <user specified delimiter> -preservespace [specifies if spaces should be preserved]
For details about the CSV2XML arguments, see CSV2XML Arguments.
6. Validate the XML file against the DTD and test your changes.
Isto foi útil?