170 pts.
 Reading XML file from RPGLE program by using XML-INTO opcode
How can I move data from XML to Data structure if data is more than 9999 in XML? The problem is I can declare the data structure with array max size 9999 where as using XML-INTO (ex: XML-INTO OrderList %XML('/home/orderlist.xml') : ' doc=file case=any') ). I can load first 9999 set of data but then what about rest of data? Can you please help me?

Software/Hardware used:
software
ASKED: February 28, 2013  9:53 AM
UPDATED: February 28, 2013  12:20 PM
  Help
 Approved Answer - Chosen by harith (Question Asker)

Why do you have to limit your array to 9999 elements? Please show your definitions. It will be easier if we know what definitions are involved.
 
If it turns out that you can't specify an array large enough, you will need to code a 'handler' procedure and use the %HANDLER() format of XML-INTO.
 
Tom

ANSWERED:  Feb 28, 2013  11:41 AM (GMT)  by harith

 
Other Answers:
Last Wiki Answer Submitted:  March 1, 2013  1:01 pm  by  harith   170 pts.
Latest Answer Wiki Contributors:  harith   170 pts. , Michael Tidmarsh   11,380 pts.
To see other answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

Thanks Tom I got my answer i wil use  %handlerthanks once again

 170 pts.

 

Is it clear that (9999) is not the limit for elements in arrays? The smallest limit in current releases is 32767, while the most current limit is 16773104 elements. Data structures have similar limits. Total size of a defined data structure or array in the current release is 16773104 bytes. (The number of elements along with total size implies that such an array would have elements that are 1 byte each.) A %HANDLER() procedure would be called for when a XML attribute is too large to handle or perhaps is radically variable that it’s too inefficient to declare maximum allowed size. — Tom

 107,735 pts.