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



>Ok, so are there tried-and-proven methods...

Yes

>...or is this something so simple that people just roll their own?

Yes! <G>

I've _not_ done this from RPG so I can't comment on the ease from there, but
remember, XML is just a big text string. The trick is coming up with the
schema that describes your data. If you are both the publisher and consumer
of the XML you're free to pick, else you have to negotiate.

For example, take the following normalized DB:

Customers:
ID      Name
1       Bob
2       Jane

Items:
ID      Name
1       Razor
2       Watch
3       Windows XP

Orders:
ID      Cust    Date
1       1       5/13/03
2       1       5/14/03
3       2       5/14/03

Order Lines:
Order   Line    Item    Qty
1       1       1       5
1       2       3       1
2       1       2       4
2       2       3       100
3       1       1       1

For order #1 the following XML snipit is valid:

<Order ID="1" Date="5/13/03">
        <OrderLine Line="1" Item="1" Qty="5"/>
        <OrderLine Line="2" Item="3" Qty="1"/>
</Order>

However, for the first line item the following is also valid:
        <OrderLine LineNo="1" ItemNo="1" Quantity="5"/>

As is:
        <OLine Ln="1" ItemNumber="1" HowMany="5"/>

As is:
        <Line TheLine="1" TheItem="1" Count="5"/>       

Etc. In each of these cases I've described the same data using different
words (ie. Qty, Quantity, Howmany, Count) What you use doesn't really matter
as long as the publisher and consumer agree on the words and that's the
point of the schema.

As to "how" to generate this, you could use the CONCAT opcode and make the
string, piece it together using arrays, use DOM, or probably use a fancy SQL
statement, it doesn't matter. 

-Walden

------------
Walden H Leverich III
President
Tech Software
(516) 627-3800 x11
(208) 692-3308 eFax
WaldenL@xxxxxxxxxxxxxxx
http://www.TechSoftInc.com 

Quiquid latine dictum sit altum viditur.
(Whatever is said in Latin seems profound.)
 

As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.