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



Jon Paris wrote:
The XML-INTO is pure DOM processing; you
tell it where in the document to get some data, and it pulls it out,
thank you very much.

Unless I completely mis-understand DOM Joe, XML-INTO is not a DOM parser.
Agreed. I said it's DOM processing, not a DOM parser.

The only thing you can tell it to do (via the path=... option in the %XML BIF) is where to start in the document. But that is a long way from the DOM notion of random access.
I used the term "DOM processing" simply to contrast with SAX processing; you can point it to a specific spot in the document and pull out specific elements. With SAX you have to handle every event, even if it's just to ignore it.

path=... will let me specify to skip a chunk at the beginning before (for example) the section detailing all the invoices - but it won't let me specify to start at invoice X which is how I think of DOM.
Even that description falls far short of a true DOM parser, Jon. With a DOM parser, you can extract individual elements, perform iterative searches at different levels of the document, all of that. Heck, a true DOM parser like Xerces lets you add nodes on the fly - just like the DOM processing capabilities in JavaScript.

I do think that XML-INTO is a lot better than folks here have given it credit for - it is very "RPG-like" and works very well. It is not perfect by a long way - but for straightforward schemas it is wayyyyyyyy easier than any SAX approach.
I agree 100% - it's a lot easier for simple documents. But really I just wanted to point out another example of IBM's compiler teams doing a better job than they seem to be getting credit for of late. I guess because I've actually written a parser, I appreciate the work involved.

Joe

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.