|
Jon
Many thanks for taking the time out. I did not now that RPG's XML
support could handle attributes.
message: 6
date: Mon, 16 Feb 2009 10:34:49 -0500
from: Jon Paris <Jon.Paris@xxxxxxxxxxxxxx>
subject: Re: Creating XML data for posting
On 16-Feb-09, at 4:18 AM, rpg400-l-request@xxxxxxxxxxxx wrote:
Not being an XML expert I was curious to know what you mean by :-
For example you can only create elements - not attributes. SO the
vast majority of XML generated will require a transform to be useful.
The vast majority of XML documents will include things like this:
<Customers>
<Customer category='Retail' number='J01234'>
<Name>Jones and Co.</Name>
<Address type='mailing'>
<Street> .......
"category", "number" and "type" are attributes. "Customer" and "Name"
are both elements. The COBOL support can only generate elements -
there is no way to tell it that a data name represents an attribute.
From a hierarchical perspective, an attribute is at the same level as a
child element of the element to which it belongs. In other words
"category" is at the same hierarchical level as "Name" or "Address" -
and when processed by RPG's XML-INTO would be treated that way.
This is not even to mention things like namespaces and other joys.
We have used the COBOL technique to generate simple XML structures to
facilitate our testing of RPG programmes parsing XML document and for
this it has been an help.
It sounds as if your RPG is consuming in-house developed schemas - not
industry standard ones that you have received form the outside world.
If this is the case the COBOL stuff will work for you but it is only
these simple cases that it will work for.
My comment related to the fact that using tools like CGIDEV2 (or indeed
any templating system) is so easy to do and so flexible that I would
hate to see the RPG team waste scarce resources to implement something
with such limited capability.
Jon Paris
--
This is the RPG programming on the IBM i / System i (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.