You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by "Alex D. Fleming" <lo...@yahoo.com> on 2006/10/05 09:46:11 UTC

Data File tool Help for comma seperated file

Hi,
 
 I would like to parse a text file through Data File Tool.I have seen the description in the old wiki.And it gives example of the Fixed width and Fixed Record.I am looking for any solution for the following comma separated file.
 
 "admin","PARTY_GROUP"
 "flexadmin","PERSON"
 "flexadmin1","PERSON"
 "flexadmin3","PERSON"
 
 Please give me some hint to change this shema definition file to handle above comma seperated file.Because it is not generating the xml file.
 ****************************
 
<data-file name="party" separator-style="delimited" type-code="text" delimiter=",">
   <record name="Party" limit="many">
     <field name="partyId" type="String"/>
     <field name="partyTypeId" type="String"/>
   </record>
</data-file>

********************

Please tell me what I am missing ???

 Thx 
 Alex D. Fleming
 
 		
---------------------------------
How low will we go? Check out Yahoo! Messenger’s low  PC-to-Phone call rates.

Re: Data File tool Help for comma seperated file

Posted by "Alex D. Fleming" <lo...@yahoo.com>.
Thx Jacopo,
 It worked for me.
 The way you explained will remain always in my mind :)
 Thx for such a nice support.
 
 Alex D. Fleming

Jacopo Cappellato <ti...@sastau.it> wrote: Alex,

I did a quick test and I could create the file.
Here is the complete definition I've used:




 
xsi:noNamespaceSchemaLocation="http://www.ofbiz.org/dtds/datafiles.xsd">

delimiter=",">
    
      
      
  type="String"/>
    



And here are the steps I've followed:

1) go to https://localhost:8443/webtools/control/viewdatafile
2) enter the complete path to the above file in the first field
3) submit the form
4) the second field is now a drop down box; select the only entry 
present there: "party"
5) in the third field (Data Filename or URL:) enter the path to the csv 
file containing your data
6) in the last field (Save to entity xml file:) enter the path to the 
xml file you want to create (if you leave this field empty the output 
will be on screen)

However you have to remove all the " from your csv file because they 
will mess the xml file; i.e. the supported format is this:

admin,PARTY_GROUP
flexadmin,PERSON
flexadmin1,PERSON
flexadmin3,PERSON

Hope this helps,

Jacopo




Alex D. Fleming wrote:
> Hi,
>  
> I would like to parse a text file through Data File Tool.I have seen the description in the old wiki.And it gives example of the Fixed width and Fixed Record.I am looking for any solution for the following comma separated file.
>  
>  "admin","PARTY_GROUP"
>  "flexadmin","PERSON"
>  "flexadmin1","PERSON"
>  "flexadmin3","PERSON"
>  
> Please give me some hint to change this shema definition file to handle above comma seperated file.Because it is not generating the xml file.
>  ****************************
>  
> 
>    
>      
>      
>    
> 
> 
> ********************
> 
> Please tell me what I am missing ???
> 
>  Thx 
>  Alex D. Fleming
>  
>    
> ---------------------------------
> How low will we go? Check out Yahoo! Messenger’s low  PC-to-Phone call rates.



 		
---------------------------------
 All-new Yahoo! Mail - Fire up a more powerful email and get things done faster.

Re: Data File tool Help for comma seperated file

Posted by Jacopo Cappellato <ti...@sastau.it>.
Alex,

I did a quick test and I could create the file.
Here is the complete definition I've used:

<?xml version="1.0" encoding="UTF-8" ?>

<data-files xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 
xsi:noNamespaceSchemaLocation="http://www.ofbiz.org/dtds/datafiles.xsd">
<data-file name="party" separator-style="delimited" type-code="text" 
delimiter=",">
    <record name="Party" limit="many">
      <field name="partyId" type="String"/>
      <field name="partyTypeId"
  type="String"/>
    </record>
</data-file>
</data-files>

And here are the steps I've followed:

1) go to https://localhost:8443/webtools/control/viewdatafile
2) enter the complete path to the above file in the first field
3) submit the form
4) the second field is now a drop down box; select the only entry 
present there: "party"
5) in the third field (Data Filename or URL:) enter the path to the csv 
file containing your data
6) in the last field (Save to entity xml file:) enter the path to the 
xml file you want to create (if you leave this field empty the output 
will be on screen)

However you have to remove all the " from your csv file because they 
will mess the xml file; i.e. the supported format is this:

admin,PARTY_GROUP
flexadmin,PERSON
flexadmin1,PERSON
flexadmin3,PERSON

Hope this helps,

Jacopo




Alex D. Fleming wrote:
> Hi,
>  
>  I would like to parse a text file through Data File Tool.I have seen the description in the old wiki.And it gives example of the Fixed width and Fixed Record.I am looking for any solution for the following comma separated file.
>  
>  "admin","PARTY_GROUP"
>  "flexadmin","PERSON"
>  "flexadmin1","PERSON"
>  "flexadmin3","PERSON"
>  
>  Please give me some hint to change this shema definition file to handle above comma seperated file.Because it is not generating the xml file.
>  ****************************
>  
> <data-file name="party" separator-style="delimited" type-code="text" delimiter=",">
>    <record name="Party" limit="many">
>      <field name="partyId" type="String"/>
>      <field name="partyTypeId" type="String"/>
>    </record>
> </data-file>
> 
> ********************
> 
> Please tell me what I am missing ???
> 
>  Thx 
>  Alex D. Fleming
>  
>  		
> ---------------------------------
> How low will we go? Check out Yahoo! Messenger’s low  PC-to-Phone call rates.