Return-Path: X-Original-To: apmail-ofbiz-user-archive@www.apache.org Delivered-To: apmail-ofbiz-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 1E98B110BA for ; Tue, 1 Jul 2014 14:13:35 +0000 (UTC) Received: (qmail 33452 invoked by uid 500); 1 Jul 2014 14:13:34 -0000 Delivered-To: apmail-ofbiz-user-archive@ofbiz.apache.org Received: (qmail 33423 invoked by uid 500); 1 Jul 2014 14:13:34 -0000 Mailing-List: contact user-help@ofbiz.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@ofbiz.apache.org Delivered-To: mailing list user@ofbiz.apache.org Received: (qmail 33411 invoked by uid 99); 1 Jul 2014 14:13:34 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 01 Jul 2014 14:13:34 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of pierre.smits@gmail.com designates 209.85.212.169 as permitted sender) Received: from [209.85.212.169] (HELO mail-wi0-f169.google.com) (209.85.212.169) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 01 Jul 2014 14:13:29 +0000 Received: by mail-wi0-f169.google.com with SMTP id hi2so7485512wib.2 for ; Tue, 01 Jul 2014 07:13:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:references:from:content-type:in-reply-to:message-id:date:to :content-transfer-encoding:mime-version; bh=ruUOdtqD/rt6YTCOQvrPYQl8GdplWSHWP6RSvPswFuA=; b=FmhL6GaILh57DLXmYcqwIHdL88O9uTGpBZh6HVRAc8Az5dgjXGJ3BOSNeBmrZIl2N6 6RgXSpD24cEPeBxJD6UI8nGQri9SPSkxwkwQ9aXONIu4NQDt8h7hnLK4AX4atC7Bm36Z +uUSwVz8hbAwRnN/MleINbuq8Ixcyy3mGjz+CGHSCgyw5KTxiKL5kdN7HLVxNROXgPM5 VBrTh72v11IiKfgT8ixpoiaDlCc/ve4c+GR9acLnOI011Btb/GgRYCYMaM17/MJkBS1r H4PbnEHRBwkAMClllz/9suXgg8v9zbQ5iRcqh7vjVwpFiqnN8kCBvGD9mNhUm81tJR2b 4fpA== X-Received: by 10.194.92.148 with SMTP id cm20mr53248191wjb.57.1404223983163; Tue, 01 Jul 2014 07:13:03 -0700 (PDT) Received: from [192.168.1.6] (athedsl-4555717.home.otenet.gr. [94.70.79.205]) by mx.google.com with ESMTPSA id l2sm4644516wjw.31.2014.07.01.07.13.01 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 01 Jul 2014 07:13:02 -0700 (PDT) Subject: Re: Generic xml import & export functionality References: <24550384.46.1403988051790.JavaMail.taher@pythys-ultra> <53AF6EE5.2030306@yahoo.com> <53B072F2.30708@sandglass-software.com> <53B2C049.1040805@artifact-software.com> From: "Pierre @GMail" Content-Type: text/plain; charset=us-ascii X-Mailer: iPhone Mail (11D201) In-Reply-To: <53B2C049.1040805@artifact-software.com> Message-Id: Date: Tue, 1 Jul 2014 17:12:55 +0300 To: "user@ofbiz.apache.org" Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (1.0) X-Virus-Checked: Checked by ClamAV on apache.org Ron, Thans! Regards, Pierre Sent from my iPhone > On 1 jul. 2014, at 17:06, Ron Wheeler wro= te: >=20 > Have a good look at XSLT before starting to write code. >=20 > http://www.w3schools.com/xsl/xsl_transformation.asp > http://www.cs.toronto.edu/~ryanjohn/teaching/cscc43-s12/lectures/c43-xslt-= v02.pdf >=20 > 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 >=20 > XSLT, 2nd Edition > Mastering XML Transformations >=20 > Ron >=20 >> On 01/07/2014 5:37 AM, Pierre Smits wrote: >> Hi All, >>=20 >> 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. >>=20 >> Question is: do you know of an example in OFBiz applying some of the >> functions to process an external XML file? >>=20 >> Regards, >>=20 >> Pierre Smits >>=20 >> *ORRTIZ.COM * >> Services & Solutions for Cloud- >> Based Manufacturing, Professional >> Services and Retail & Trade >> http://www.orrtiz.com >>=20 >>=20 >> On Sun, Jun 29, 2014 at 10:11 PM, Adrian Crum < >> adrian.crum@sandglass-software.com> wrote: >>=20 >>> I agree. Using a transformer seems the way to go. >>>=20 >>> Adrian Crum >>> Sandglass Software >>> www.sandglass-software.com >>>=20 >>>=20 >>>> On 6/28/2014 6:41 PM, Rajbir Saini wrote: >>>>=20 >>>> Pierre, >>>>=20 >>>> 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. =46rom there on OFBiz can= >>>> take care of importing the data into database using entity-engine XML. >>>>=20 >>>> Regards, >>>>=20 >>>> Raj >>>>> On Sunday 29 June 2014 02:41 AM, Pierre Smits wrote: >>>>>=20 >>>>> Taher, >>>>>=20 >>>>> Any hint towards a direction is help. So, thank you. >>>>>=20 >>>>> Yes, validating is essential. Thus, having to do custom business logic= is >>>>> expected. >>>>>=20 >>>>> 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. >>>>>=20 >>>>> Regards, >>>>>=20 >>>>>=20 >>>>> Pierre Smits >>>>>=20 >>>>> *ORRTIZ.COM * >>>>> Services & Solutions for Cloud- >>>>> Based Manufacturing, Professional >>>>> Services and Retail & Trade >>>>> http://www.orrtiz.com >=20 >=20 > --=20 > Ron Wheeler > President > Artifact Software Inc > email: rwheeler@artifact-software.com > skype: ronaldmwheeler > phone: 866-970-2435, ext 102 >=20