× 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.



I have an existing RPG *SRVPGM that pulls an XML document into a data structure. It makes multiple XML-INTO calls, and I’m wondering if I can accomplish it with a single XML-INTO (or if I’ll need to use XML-SAX). It’s currently using the path parameter on XML-INTO to navigate down two levels. I tried to point it at the top level, but that failed.

XML snippet:
<topLevel>
<products>
<product … />
<product …/>
<products>
<loads>
<load …/>
<load …/>
<loads>
<stages>
<stage …/>
<stage …/>
<stages>
{pattern repeats}
</topLevel>

Data structure:
Dcl-ds gOutputDs qualified inz ;
Products likeDs() dim() ;
Stages likeDs() dim() ;
productsToLoad likeDs() dim() ;
loadedContainers likeDs() dim() ;
unloadedProducts likeDs() dim();
End-ds;

RPG (current snippet):
Xml-into€ gOutput.products %xml(fullFilePath :’doc=file path=topLevel/products/product allowextra=yes’);


I was hoping I could find the correct “path”, but so far the RPG docs & Google have failed me.

TIA

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.