× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Thank you Vernon for your reply. I was finally able to get it to work.

Moses Nang
Integrated Merchandising Systems
(847) 583-7112


-----Original Message-----
From: WEB400 [mailto:web400-bounces@xxxxxxxxxxxx] On Behalf Of Vernon Hamberg
Sent: Thursday, May 08, 2014 5:42 PM
To: Web Enabling the IBM i (AS/400 and iSeries); RPG programming on the IBM i / System i
Subject: Re: [WEB400] XML-INTO Example

I've also replied on the RPG400 list and prefer to continue there.

Moses, what do you have so far? You will need some kind of data
structure. It'd help if you give us your start or how far you've come -
I'm not ready to start from the beginning. Besides, my boss would be
very displeased, considering the pressure we are under right now!!

You say watered down - it would be helpful to have the true structure -
and just so you know, XML-INTO has its limits - if things get
complicated, you may need to look at XML-SAX.

Nonetheless, there are several good examples of what the structure
should be for - RPG Reference is the place to look.

If it's possible, you'll want to have the structure start, perhaps, at
the <order> - you have choices in this - you would want an array in your
DS for <order> - another array for <item> things.

HTH
Vern

On 5/8/2014 3:42 PM, Moses Nang wrote:
Hello,

I'm fairly new to using xml-into. I'm currently trying to write a program that uses xml-into and %handler to parse order information. How can I use xml-into and %handler to parse the xml and write them into separate header and detail tables without having to specify the order nbr inside of the item_list section. Anyone have an example I can check out? Below is a watered down sample xml I need to parse:

<request>
<order>
<nbr>123</nbr>
<item_list>
<item>abc</item>
<item>def</item>
</item_list>
</order>
<order>
<nbr>456</nbr>
<item_list>
<item>abc</item>
<item>def</item>
<item>xyz></item>
</item_list>
</order>
</request>

Thanks,

Moses Nang
Integrated Merchandising Systems
(847) 583-7112


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.