XML-INTO

25 pts.
Tags:
IBM DB2
RPG IV
XML
I'm trying to use XML-INTO with %XML to convert an XML document into a DB2 database file. The XML file has four levels of data with elements from each level that need to be used for the database record. Naturally, the relationships between the level are important, too. The levels are Header (control # + date), Detail (item), Quantity type (sales or inventory) & location (location + quantity). With XML-INTO and %XML I've been able to see the data from the first three levels, but can't seem to get to the forth and still preserve the relationships between the levels; using the path option works fine, but what's the point in retrieving all the detail-level records if I can't relate those to the locations that sold them? I've attempted to use %handler, too, but find the path option also limiting there. Can XML-INTO handle the parsing of this complicated an XML document? If so, what am I missing? Thanks. Gordon

Answer Wiki

Thanks. We'll let you know when a new response is added.

I have not used these RPG operation codes, but I have started evaluating an XML parser for RPG called EXPAT.

For me, it does seem to be very easy to use, and it’s free. See details here:

http://www.scottklement.com/expat/

If you have problems getting the articles mentioned, try looking here:

http://systeminetwork.com/node/60993

http://systeminetwork.com/node/60999

http://systeminetwork.com/node/61002

http://systeminetwork.com/article/using-expat-xml-parser-rpg-program-part-4

I know that this is not exactly the answer you want; I’m sure that other people will be able to help you with the RPG codes, however, and maybe if you still find you are having problems then this EXPAT utility might be the answer.

Regards,

Sloopy

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following