You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by Len Shein <ls...@solveda.com> on 2013/06/28 20:11:18 UTC
XML Import to Datasource
When importing XML to the DB, if an attribute has an empty value, the Entity
Sax Reader skips the attribute and therefore does NOT update the value in
the DB.
For Example:
If the DB PRODUCT.PRODUCT_NAME contains a value of 'My Product Name'.
Using the following XML will not update the PRODUCT_NAME to empty.
<entity-engine-xml>
<Product productId="12345" productName=""/>
</entity-engine-xml>
Is there a property or setting that will allow the XML to update the DB with
an empty attribute value?
Thank You
Len Shein
lshein@solveda.com
lshein@verizon.net
516.742.7888 ext.225
732.333.4303
RE: XML Import to Datasource
Posted by Len Shein <ls...@solveda.com>.
I am using Ofbiz version 10.04.
For now I will review the addon and see what I can use in this version.
Thanks
Len
-----Original Message-----
From: Nicolas Malin [mailto:malin.nicolas@librenberry.net]
Sent: Friday, June 28, 2013 2:35 PM
To: user@ofbiz.apache.org
Subject: Re: XML Import to Datasource
What your ofbiz version ?
If it's trunk, try :
<entity-engine-xml>
<create-replace>
<Product productId=12345 *productName=*/>
</create-replace>
</entity-engine-xml>
If it's 12.04, I can use a backport addon
http://addons.neogia.org/addons-12.04/ofbiz-backport-loading-data-actions-ta
g/
to use this fonctionnality.
Nicolas
Le 28/06/2013 20:11, Len Shein a écrit :
>
> When importing XML to the DB, if an attribute has an empty value, the
> Entity Sax Reader skips the attribute and therefore does NOT update
> the value in the DB.
>
> For Example:
>
> If the DB PRODUCT.PRODUCT_NAME contains a value of *My Product Name*.
>
> Using the following XML will not update the PRODUCT_NAME to empty.
>
> <entity-engine-xml>
>
> <Product productId=12345 *productName=*/>
>
> </entity-engine-xml>
>
> Is there a property or setting that will allow the XML to update the
> DB with an empty attribute value?
>
> Thank You
>
> Len Shein
>
> lshein@solveda.com <ma...@solveda.com>
>
> lshein@verizon.net <ma...@verizon.net>
>
> 516.742.7888 ext.225
>
> 732.333.4303
>
--
Nicolas MALIN
Consultant
Tél : 06.17.66.40.06
Site projet : http://www.neogia.org/
-------
Société LibrenBerry
Tél : 02.48.02.56.12
Site : http://www.librenberry.net/
Re: XML Import to Datasource
Posted by Nicolas Malin <ma...@librenberry.net>.
What your ofbiz version ?
If it's trunk, try :
<entity-engine-xml>
<create-replace>
<Product productId=”12345” *productName=””*/>
</create-replace>
</entity-engine-xml>
If it's 12.04, I can use a backport addon
http://addons.neogia.org/addons-12.04/ofbiz-backport-loading-data-actions-tag/
to use this fonctionnality.
Nicolas
Le 28/06/2013 20:11, Len Shein a écrit :
>
> When importing XML to the DB, if an attribute has an empty value, the
> Entity Sax Reader skips the attribute and therefore does NOT update
> the value in the DB.
>
> For Example:
>
> If the DB PRODUCT.PRODUCT_NAME contains a value of ‘*My Product Name*’.
>
> Using the following XML will not update the PRODUCT_NAME to empty.
>
> <entity-engine-xml>
>
> <Product productId=”12345” *productName=””*/>
>
> </entity-engine-xml>
>
> Is there a property or setting that will allow the XML to update the
> DB with an empty attribute value?
>
> Thank You
>
> Len Shein
>
> lshein@solveda.com <ma...@solveda.com>
>
> lshein@verizon.net <ma...@verizon.net>
>
> 516.742.7888 ext.225
>
> 732.333.4303
>
--
Nicolas MALIN
Consultant
Tél : 06.17.66.40.06
Site projet : http://www.neogia.org/
-------
Société LibrenBerry
Tél : 02.48.02.56.12
Site : http://www.librenberry.net/