5 pts.
 XML and RPG
I do not have the XML toolkit package on my i5 525. We are running V5R4. Is there still a way for me to import XML files and run in RPG ILE? I have a customer that wants to send us orders via email and XML is one of the formats they could provide for us.

Software/Hardware used:
ASKED: August 18, 2008  2:09 PM
UPDATED: August 18, 2008  6:32 PM

Answer Wiki:
Of course you can, but it will be a brute force solution. Your XML file will (most likely) reside in the IFS so it will simply be a stream file. I hope you have Scott Klements toolbox for IFS manipulation. http://www.scottklement.com/rpg/ifs_ebook/. Without these it is still doable, but the tools again make it easier. Once you are reading the file it is simply locating the data within the <Tags>data</Tags> groupings.
Last Wiki Answer Submitted:  August 18, 2008  3:46 pm  by  DaveLevis   15 pts.
All Answer Wiki Contributors:  DaveLevis   15 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


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


 

You might also want to look at the RPG commands XML-INTO and XML-SAX

 3,115 pts.

 

As of V5R4, RPG has support for reading XML. There is an XML-INTO operation code, which reads the contents of an XML document directly into an RPG variable, which can be a field, array, data structure, or data structure array. Also, there is an XML-SAX operation.

I haven’t worked with XML as of yet, but these new op-codes sound useful.

 4,275 pts.

 

Sorry Graybeard, I didn’t see your answer until I had already posted mine.

 4,275 pts.