× 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.



We have an XML parser using some utilities provided by Scott Klement. They work great, but I thought I'd try out the XML-INTO opcode. As I was building the program, I kept thinking, wow, this opcode does SO much.

And then I ran the program. It's a very simple one. And while using Scott's utility the parsing of 12k records took about 20 seconds, using XML-INTO took about 2 minutes.

My parms:
D XML_PARMS C 'case=any +
D doc=file +
D allowmissing=yes +
D path=callDetailExportBatch/+
D callDetailRecord'

xml-into %handler( loadRecord: prt_CallCount )
%xml( xmlFile: XML_PARMS );

Here's my procedure:
P loadRecord b
D PI 10i 0
D CallCount 10i 0
D CallRecord Const Dim( 999 )
D LikeDS( CallDetailRecord )
D numOfElem 10i 0 Value


Is my array too big? I don't imagine that's an issue. I realize I didn't post all the code here, but I thought it was what was relevant. Oh, the handling procedure... all it does is this:

// Loop through all of the records passed in.
For idx = 1 to numOfElem;
callCount += 1;
ds_Cm8 = CallRecord(idx);
Write CM8FmtCF ds_CM8;

EndFor;

Return 0;

Any thoughts would be great. I'm at v5r4.

Thanks,
Kurt

As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.