|
Interesting stuff. I specifically was interested in the XML added value! It is very interesting to me that this got added as a language feature over the hundreds of other things that could have been done (I would have loved having overloading of sub procedures first, and then the ability to define custom ON-ERROR types :-) Can anybody elaborate on the path=xmlnode/name feature of the %XML bif? It is mentioned that SAX is being used, but the path feature leads me to believe that there is DOM functionality involved also which wasn't directly mentioned (not that it needs to be I guess). DOM leans toward the entire document being loaded into memory and the programmer picks what values it wants out of the document when they want them vs. doing the SAX event driven model with call-backs. While the DOM approach is much more appealing to the ease of programming, I don't know how well it would scale in a large XML capacity environment (which is what IBM's SOA initiative is calling for). When I started out parsing XML I leaned heavily towards DOM because I didn't understand call-backs and the events that took place during the parsing of a XML document, but now that I know how they work I feel it is a much better approach for performance sake. Thoughts? The other thing that would be interesting to know is how they go the DOM route with repeating structures. When I wrote my first interface over IBM's XML4PR400 API set I made the programmer accept a pointer return value when they wanted to access a list of entries (i.e. /Order/LineItemList) and then they would use that pointer to get each iteration of the items within "LineItemList". The only way I envisioned being able to easily access repeating structures with the DOM approach would be to have something similar to he following: /free count = DOM_getNodeCount(parserObject: '/Order/LineItemList/Item'); for i=1 to count by 1; itemConent = DOM_getNodeValue(parserObject: '/Order/LineItemList/Item(i)': i); endfor; /end-free .. And then what happens if you have multiple structures repeating within structures. Then you could code something like this: /free count1 = DOM_getNodeCount(parserObject: '/Order/LineItemList/Item'); count2 = DOM_getNodeCount(parserObject: '/Order/LineItemList/Item/Price'); for i=1 to count1 by 1; itemConent[i] = DOM_getNodeValue(parserObject: '/Order/LineItemList/Item(i)': i); for x=1 to count2 by 1; priceConent[x] = DOM_getNodeValue(parserObject: '/Order/LineItemList/Item(i)/Price(x)': i: x); endfor; endfor; /end-free The other thing I am wondering about is how these allow for SOAP processing and getting the encoded content into XML form so it can be parsed. This is important because 90% (a very guestimate number) of .NET and Java web services are going to pump out SOAP web services or expect to consume SOAP web services. That is just a guess based on my dealings with .NET and Java programmers in the past year or so. Very exciting to say the least!! Aaron Bartell http://mowyourlawn.com/blog -----Original Message----- From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of rob@xxxxxxxxx Sent: Wednesday, February 01, 2006 8:19 AM To: rpg400-l@xxxxxxxxxxxx Subject: Bob's letter on V5R4 RPG stuff Just in case it's bad form for him to post his own newsletter link... http://www.mcpressonline.com/mc/.6b33a18a Rob Berendt -- Group Dekko Services, LLC Dept 01.073 PO Box 2000 Dock 108 6928N 400E Kendallville, IN 46755 http://www.dekko.com -- This is the RPG programming on the AS400 / 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.
As an Amazon Associate we earn from qualifying purchases.
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.