|
LOL Dutch - I've just started using XML-INTO - it's a dream for the
single-level XML schema I'm faced with.
The %handler thing saved my butt, once I got my mind around it - a couple
2x4 pushes didn't hurt - too much!
Later
Vern
----- Original Message -----
I'm reading through them now Vern. Thanks :) Btw feel free to use the 2x4
anytime you believe I need a smack down :)
Dutchproblem.
Jon Paris has some articles on XML-INTO that are worth looking at - as I
recall, he discusses handling nested elements.
Speaking of handling, you probably want to use the %handler() form of
XML-INTO.
And you'll want to specify a path in the options - then you can deal with
nested stuff more easily, I think.
And if you use %handler(), looping is a non-issue.
HTH
Vern
----- Original Message -----
I was trying to back into this a bit, but maybe that's part of my
work
We are going to need to standardize our xml docs some for mapping
purposes, but where I think I'm going to struggle the most (until I get a
full understanding of it) is with nested multiple values.
As an example, I can get Scott's simple student example to work with no
trouble, and probably can, although it didn't for this try, get it to
with others but when I have something like this:
<LoadInformation>
<Shipper>
<Name>
<Short>WALMT</Short>
<FullName>Walmart</FullName>
</Name>
</Shipper>
<Consigee>
<Name>
<Short>WALMT-1902</Short>
<FullName>Walmart Store 1902</FullName>
</Name>
</Consignee>
<Stop>
<StopNo>1</StopNo>
<StopName>WALMT</Stop>
<StopFullName>Walmart Store 1899</StopFullName>
<Address>123 Main Street</Address>
<City>Somewhere</City>
<State>TX</State>
<ZipCode>90210</ZipCode>
</Stop>
<Stop>
<StopNo>2</StopNo>
<StopName>WALMT</Stop>
<StopFullName>Walmart Store 1099</StopFullName>
<Address>1099 Main Street</Address>
<City>Somewhere</City>
<State>TX</State>
<ZipCode>90210</ZipCode>
</Stop>
<Stop>
<StopNo>3</StopNo>
<StopName>WALMT</Stop>
<StopFullName>Walmart Store 2899</StopFullName>
<Address>2899 Main Street</Address>
<City>Somewhere</City>
<State>TX</State>
<ZipCode>90210</ZipCode>
</Stop>
<Stop>
<StopNo>4</StopNo>
<StopName>WALMT</Stop>
<StopFullName>Walmart Store 5899</StopFullName>
<Address>5899 Main Street</Address>
<City>Somewhere</City>
<State>TX</State>
<ZipCode>90210</ZipCode>
</Stop>
</LoadInformation>
So I have to create a main DS for the LoadInformation, and then a sub DS
for the Stop and Shipper information.
Its the looping part for the stops that's gonna give me fits...
I'm going to try another one with very limited fields and ignore the
transactionset header info and see if that makes any difference.
Dutch
--
This is the RPG programming on the IBM i (AS/400 and iSeries) (RPG400-L)
mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.
--
This is the RPG programming on the IBM i (AS/400 and iSeries) (RPG400-L)
mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.
--
This is the RPG programming on the IBM i (AS/400 and iSeries) (RPG400-L)
mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.
--
This is the RPG programming on the IBM i (AS/400 and iSeries) (RPG400-L)
mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.
As an Amazon Associate we earn from qualifying purchases.
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.