× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



ok - then - looks like I have some more reading to do - thanks
MLR



From: "Tyler, Matt" <matt.tyler@xxxxxxxxxxxxxx>
To: "RPG programming on the IBM i / System i" <rpg400-l@xxxxxxxxxxxx>
Date: 01/26/2012 03:45 PM
Subject: RE: XML-INTO with %HANDLER
Sent by: rpg400-l-bounces@xxxxxxxxxxxx



I had to parse a four large Lawson Report Writer XML document (up to
several hundred megs big ). Its structure was not deep and was
consistence enough but repeated an unknown number of times. I first
coded the XML-INTO with a handler. During testing it took about 3
minutes for the documents to be processed. I ended up going to the
XML-SAX (I forget the exact reason but it was because of the document I
had to process), when I was done figuring out all the needed handler
code the same documents processed in 30 seconds.

It was more work with the XML-SAX but I learned a lot from the
experience.

Below are code samples I used to build my experience with the XML-SAX
parser.

http://code.midrange.com/6ad9d425e7.html
http://code.midrange.com/36f1294cf9.html
http://code.midrange.com/2258cfb028.html


try them out.

Thanks, Matt
-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of
MRiggins@xxxxxxxxxxxx
Sent: Thursday, January 26, 2012 2:04 PM
To: RPG programming on the IBM i / System i
Subject: Re: XML-INTO with %HANDLER

Are you using %handler because the PO data structure is too big when you

make the arrays as big as you need? (Just curious.)

Yes that is correct.

The example I sent just showed one POChange set. There will be multiple

POChange sets and I wanted to be able to process an XML file that had an

unknown number of these sets.

Thanks,
MLR



From: Barbara Morris <bmorris@xxxxxxxxxx>
To: rpg400-l@xxxxxxxxxxxx
Date: 01/26/2012 02:59 PM
Subject: Re: XML-INTO with %HANDLER
Sent by: rpg400-l-bounces@xxxxxxxxxxxx



On 1/26/2012 12:07 PM, MRiggins@xxxxxxxxxxxx wrote:
that's good info, I'm concerned that I have 3 nodes at the same level
of
ChangePODetail.
I have the ChangePODetail, SplitPODetail and NewPODetail - is that
possible to handle in this way?

No, if you need to handle the ChangePODetail's using %handler, you'd
have to handle anything at the same level separately.

Are you using %handler because the PO data structure is too big when you

make the arrays as big as you need? (Just curious.)


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.