|
[EDI-L Mailing List Archive Home]
[Message List]
[Reply To This Message]
Re: XML Hierarchy Question

Quoted text is from <017801c503ff$0bba9c10$c970fea9@oemcomputer>, by
William J. Kammerer <
>Great question! Generally, hierarchy is good, as Messrs. Wertheimer,
>Johnson and Chessman acclaim. But in this case, I kind of feel that
>the "detail" should be at the same level as the "header," if I'm
>understanding you correctly. In good ol' soon-to-be-sunsetted
>Trad*EDI, this is true: Table 1 (the header) is considered to be at the
>same "level" as Table 2 (the detail). The PO1 loop in the 850 PO is
>(implicitly) nested at the same level as typical header information
>like the N1 Buyer loop.
Yes, but consider what you would do if you wanted to process the
information in the 850 to a flat file for import into MS Excel. You
would search out all the information you wanted at the ST level and
write it to a record, then you would loop through the N1's and pick out
what was relevant to you from each instance and append it to the record;
forming a superheader, which you would remember. For each PO1 you would
pick out what you wanted, append it to the superheader and write it out
as a record.
The advantage is that every record, which pertains to a detail line, has
all the header information associated with it on the same record. The
disadvantage is that you have an awful lot of repetition in your file.
Loops in hierarchical structures act in the same way as tables in a
database; it is just that you use physical position in the hierarchy to
relate it to other 'tables' rather than keys.
Regards
Chris
--
Chris Johnson mobile:+44 (0)7785 302122
EDIMatrix Ltd work: 0845 126 0680 or +44 20 8559 2454
fax: +44 (0)20 8559 2497
EDI website http://www.edimatrix.co.uk
|
 |
Subscribe in XML format
| RSS 2.0 |
|
| Atom 0.3 |
|
|