ofbiz-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jacques Le Roux <jacques.le.r...@les7arts.com>
Subject Re: Generic xml import & export functionality
Date Tue, 01 Jul 2014 18:26:54 GMT
Also Freemarker can be used for this kind of tasks..

Jacques

Le 01/07/2014 16:43, Taher Alkhateeb a écrit :
> Hi pierre
>
> I am not sure if XSLT alone is enough. Are you only converting xml to xml?
> If no then you must parse into DOM and apply some business logic.
>
> Also UtilXml has alot of examples. Just follow the code from the controller
> and you will see it pop up all over the place as the screens and forms are
> parsed into DOM. There is more than enough code in the framework itself.
>
> Taher Alkhateeb
> On Jul 1, 2014 5:13 PM, "Pierre @GMail" <pierre.smits@gmail.com> wrote:
>
>> Ron,
>>
>> Thans!
>>
>> Regards,
>>
>> Pierre
>>
>> Sent from my iPhone
>>
>>> On 1 jul. 2014, at 17:06, Ron Wheeler <rwheeler@artifact-software.com>
>> wrote:
>>> Have a good look at XSLT before starting to write code.
>>>
>>> http://www.w3schools.com/xsl/xsl_transformation.asp
>>>
>> http://www.cs.toronto.edu/~ryanjohn/teaching/cscc43-s12/lectures/c43-xslt-v02.pdf
>>> A couple of good books from O'Reilly:
>>> XSLT Cookbook Solutions and Examples for XML and XSLT Developers
>>> http://shop.oreilly.com/product/9780596003722.do
>>>
>>> XSLT, 2nd Edition
>>> Mastering XML Transformations
>>>
>>> Ron
>>>
>>>> On 01/07/2014 5:37 AM, Pierre Smits wrote:
>>>> Hi All,
>>>>
>>>> Thanks for your contributions. So I found that there is a set of
>> services
>>>> related to handling XML in UtilXml.java. It looks like that file
>> contains
>>>> (parts of) the solution needed for my requirements.
>>>>
>>>> Question is: do you know of an example in OFBiz applying some of the
>>>> functions to process an external XML file?
>>>>
>>>> Regards,
>>>>
>>>> Pierre Smits
>>>>
>>>> *ORRTIZ.COM <http://www.orrtiz.com>*
>>>> Services & Solutions for Cloud-
>>>> Based Manufacturing, Professional
>>>> Services and Retail & Trade
>>>> http://www.orrtiz.com
>>>>
>>>>
>>>> On Sun, Jun 29, 2014 at 10:11 PM, Adrian Crum <
>>>> adrian.crum@sandglass-software.com> wrote:
>>>>
>>>>> I agree. Using a transformer seems the way to go.
>>>>>
>>>>> Adrian Crum
>>>>> Sandglass Software
>>>>> www.sandglass-software.com
>>>>>
>>>>>
>>>>>> On 6/28/2014 6:41 PM, Rajbir Saini wrote:
>>>>>>
>>>>>> Pierre,
>>>>>>
>>>>>> I would suggest you to create XML schema for your XML. Schema can
do
>>>>>> some validation beyond well formed document. Write your business
rules
>>>>>> validator for validation which are not handled by schema. Use XSLT
to
>>>>>> transform your document to entity-engine XML. From there on OFBiz
can
>>>>>> take care of importing the data into database using entity-engine
XML.
>>>>>>
>>>>>> Regards,
>>>>>>
>>>>>> Raj
>>>>>>> On Sunday 29 June 2014 02:41 AM, Pierre Smits wrote:
>>>>>>>
>>>>>>> Taher,
>>>>>>>
>>>>>>> Any hint towards a direction is help. So, thank you.
>>>>>>>
>>>>>>> Yes, validating is essential. Thus, having to do custom business
>> logic is
>>>>>>> expected.
>>>>>>>
>>>>>>> On average, based on the example XML files I have received the
>>>>>>> majority of
>>>>>>> those files are below 100 kB. But, exceptions will always exist.
>>>>>>>
>>>>>>> Regards,
>>>>>>>
>>>>>>>
>>>>>>> Pierre Smits
>>>>>>>
>>>>>>> *ORRTIZ.COM <http://www.orrtiz.com>*
>>>>>>> Services & Solutions for Cloud-
>>>>>>> Based Manufacturing, Professional
>>>>>>> Services and Retail & Trade
>>>>>>> http://www.orrtiz.com
>>>
>>> --
>>> Ron Wheeler
>>> President
>>> Artifact Software Inc
>>> email: rwheeler@artifact-software.com
>>> skype: ronaldmwheeler
>>> phone: 866-970-2435, ext 102
>>>

-- 

Mime
View raw message