Article - CS178046
The first line in CSV file is not transformed into XML file when running CSV2XML utility in Windchill PDMLink
Modified: 21-Feb-2023
Applies To
- Windchill PDMLink 10.0 to 12.1
Description
- The first line in CSV file is not transformed into XML file when running CSV2XML utility in Windchill
- What will be the CSV format for loading multiple IBA values for WTDocument
- The CSV file encoding is UTF-8
- The first line is not the comment which is started with #
- For example, here is the CSV file content
BeginWTDocument,Doc1.txt,Doc1,DOC-000001,SubDoc,Document-Descriptioin,DESIGN,/Default,,,,INWORK,,A,1,
#IBAValue~definition~value1~value2~dependency_id
IBAValue,ts.centos.A1,2012-03-08 01:02:03.000000000,,
IBAValue,ts.centos.A1,2012-03-09 01:02:03.000000000,,
#EndWTDocument,primarycontenttype,path,format,contdesc,parentContainerPath,,,,,,,,,,
EndWTDocument,ApplicationData,/Doc1.txt,,,,,,,,,,,,,
- -encoding utf8 is used for CSV2XML utility
- For example, after running windchill wt.load.util.CSV2XML -input documents.csv -root /root/Documents/ -encoding utf8 for above CSV file, it gets following contents in the generated XML file. Please pay attention there is no tag BeginWTDocument in the XML file.
<?xml version="1.0" ?><!DOCTYPE NmLoader SYSTEM "standardX24.dtd">
<NmLoader>
<csvIBAValue handler="wt.iba.value.service.LoadValue.createIBAValue" >
<csvdefinition>ts.centos.A1</csvdefinition>
<csvvalue1>2012-03-08 01:02:03.000000000</csvvalue1>
<csvvalue2></csvvalue2>
<csvdependency_id></csvdependency_id>
</csvIBAValue>
<csvIBAValue handler="wt.iba.value.service.LoadValue.createIBAValue" >
<csvdefinition>ts.centos.A1</csvdefinition>
<csvvalue1>2012-03-09 01:02:03.000000000</csvvalue1>
<csvvalue2></csvvalue2>
<csvdependency_id></csvdependency_id>
</csvIBAValue>
<csvEndWTDocument handler="wt.doc.LoadDoc.endCreateWTDocument" >
<csvprimarycontenttype>ApplicationData</csvprimarycontenttype>
<csvpath>/Doc1.txt</csvpath>
<csvformat></csvformat>
<csvcontdesc></csvcontdesc>
<csvparentContainerPath></csvparentContainerPath>
</csvEndWTDocument>
</NmLoader>
This is a printer-friendly version of Article 178046 and may be out of date. For the latest version click CS178046