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



"But I can’t stress enough that this is just my naive intuition.”

Just take a look at some “simple” examples John and watch your intuition curl up and shudder in horror. <grin>


Jon Paris

www.partner400.com
www.SystemiDeveloper.com

On May 18, 2016, at 11:54 AM, John Yeung <gallium.arsenide@xxxxxxxxx> wrote:

On Wed, May 18, 2016 at 9:15 AM, Charles Wilt <charles.wilt@xxxxxxxxx> wrote:
Guess I'm guilty of repeating rumors. I've always heard XML-INTO isn't
the right choice for large complex documents.

I wouldn't call them "rumors" so much as personal choices. When OP
asked about XML handling a couple of weeks ago, he got a response from
Matt Tyler, who recommended XML-SAX rather than XML-INTO:

http://archive.midrange.com/rpg400-l/201605/msg00033.html

He was speaking from personal experience, not just parroting something he read.

I think there are *some* technical issues (I truly believe there is
some size or complexity at which XML-INTO just breaks down, though I
do not have personal experience of this). But I think a lot is just
preference and comfort level.

For example, Jon says there's a lot of "tedious" programming involved
with SAX. But I think for folks who prefer SAX-style processing, they
will likely build up a library of infrastructure code which eases some
of that tedium, or they find the SAX style so intuitive that they
don't mind or notice the tedium.

In the other direction, SAX fans often bring up how they hate the
complexity of the DS necessary for XML-INTO as the XML they are
parsing gets hairier. But Jon and Stephen are talking about
infrastructure (in the form of automated generation of D-specs), which
would take a lot of that pain and tedium away. (And it sounds like
some folks just find a lot of comfort or ease in building data
structures, and don't mind laying that groundwork even if they have to
do it manually.)

From where I'm sitting (as someone who hasn't done a whole lot of XML
processing, and none of it in RPG), it seems like both XML-SAX and
XML-INTO have potentially big hills to climb for folks just starting
out. It reminds me a lot of the discussions people have regarding IBM
system APIs. People who have already used them extensively find them
pretty easy to use. Most of these people have already built handy
RPG-friendly wrappers around any APIs they've used in the past, and
have enough wrappers under their belt that any additional ones they
have to write going forward are old hat. But for the API newbie, it
can be tricky and tedious to set them up.

Maybe if I were to use both XML-SAX and XML-INTO, I would develop a
preference for one or the other, or switch between them depending on
the kind of XML processing I want to do. To be perfectly honest, I
doubt I will get to that point, because I'll probably just pull out
Python instead.

Interesting comment about the new XML SQL stuff. Admittedly, I have't
tried it yet. Looking into it a little deeper, I can see where
"annotating" an existing schema could take some effort. Let alone building
one from scratch. It'd be nice if RDi's XML perspective offered some built
in support for this.

I know even less about the XML facilities in SQL (on any platform, not
just i) but I would have guessed that SQL has some intrinsic
advantages over RPG that would be useful for this task. In particular,
SQL is more dynamic, so I would expect it to cope with complexity and
variability more easily than RPG (especially XML-INTO). But I can't
stress enough that this is just my naive intuition.

John Y.
--
This is the RPG programming on the IBM i (AS/400 and iSeries) (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.

Please contact support@xxxxxxxxxxxx for any subscription related questions.


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.