Our Progress applications use XML for inter-application communication using 4GL procedure/functions we created in 1999 when 9.1x first came out (beta anyway). Anyway, we upgraded out application a year ago to 10.1x, but we've still been using our legacy XML functions. We are developing a new system in 10.1C that will be receiving lots of messages from external sources. We thought we'd use the READ/WRITE-XML methods of DATASETs to read and write out XML messages. However, because we can't specify the structure of the incoming documents, we are having issues with element names being reserved words in Progress. For example "parameter", "value", and "message". This wasn't a big deal with out legacy functions/procedures because we would use standard prefixes etc to get around this problem. However with the new methods we run into the reserved word issue and I don't know how to get around it.
Example XML:
We can't have something similar:
DEFINE DATASET object FOR object, parameter, value
DATA-RELATION Relationship FOR object, parameter
RELATION-FIELDS (guid,guid)
DATA-RELATION Relationship FOR parameter, value
RELATION-FIELDS (guid,guid)
And what about the relation between parents and children. In our legacy parameters we didn't need common elements to make the relationship, we used the identifiers that the DOM parser had.
Comments and recommendations would be welcome.
Don.
messages from external sources. We thought we'd use
the READ/WRITE-XML methods of DATASETs to read and
write out XML messages. However, because we can't
specify the structure of the incoming documents, we
are having issues with element names being reserved
words in Progress. For example "parameter", "value",
and "message". This wasn't a big deal with out legacy
functions/procedures because we would use standard
prefixes etc to get around this problem. However with
the new methods we run into the reserved word issue
and I don't know how to get around it.
In 10.1C there's an XML-NODE-NAME option on the buffer, buffer field, dataset and temp-table definitions, which allows you to name your field 'cParameter' and have it written into XML as 'Parameter'.
-- peter
If you already have the expertise in writing the procedures, especially if they are SAX, you might want to just stick with them. The READ-XML and WRITE-XML are sure handy for ABL to ABL communication, but they don't yet have enough flexibility to handle general input from the outside, do what you know.