ofbiz-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jacopo Cappellato <...@sastau.it>
Subject Re: Data File tool Help for comma seperated file
Date Thu, 05 Oct 2006 08:10:17 GMT
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.


Mime
View raw message