On Sep 15, 2011, at 11:31 AM, midrange-l-request@xxxxxxxxxxxx wrote:
I have seen samples like that, but does this counter tell how many of the count of that element are in the document, or how many were parsed? That is, if I have a 10 element array, and the counter says 10, does that mean that I got all the elements, and it just happened to fill up the array, or does it mean that there are 10 or more elements in the document, and I got as many as I can handle.
It depends I'm afraid. If you said allowextra=yes then a count of (say) 10 would mean _either_ that exactly 10 were retrieved OR that more than 10 were present but it stopped processing when the array was full. If you said allowextra=no then a count of 10 means there were exactly 10 present.
If you truly have a completely arbitrary number of repeating elements then the best way to handle it is using %Handler with XML-INTO.
It also depends a little on what release you are on as to what bells and whistles you can take advantage of.
My partner Susan and I have written a lot of stuff on all of this including the V7 updates.
Here's a couple of references:
V6+
http://www.ibmsystemsmag.com/ibmi/developer/rpg/XML-INTO-Revisited/
V6+
http://www.ibmsystemsmag.com/ibmi/developer/rpg/New-and-Improved-XML-INTO/
V5R4+
http://www.ibmsystemsmag.com/ibmi/developer/rpg/More-on-RPG-s-XML-Support
V5R4+ on %Handler
http://www.mcpressonline.com/programming/rpg/handling-xml-into-problems.html
Hope this helps.
Jon Paris
www.partner400.com
www.SystemiDeveloper.com
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.