Reading and writing XML,in Progress 10.1b

Posted by Admin on 12-Jan-2009 14:01

First I am using Progress 10.1b.

I have a temp table of data. I manually create my xml output as a super long string. This works. It got me up and running quickly.

However, you can easily see the limitations to this form of manually created output.

I am wondering if I can somehow use read-xml on that output to get my schema, and temp table definition, so I can use write-xml to create my output.

Can this be done, and if so, are there any useful examples I can reference? HELP.

All Replies

Posted by Thomas Mercer-Hursh on 12-Jan-2009 16:23

READ-XML and WRITE-XML are brilliantly simple ... when they work. If it is ABL creating the XML and ABL consuming the ABL, then you should be in great shape, particularly if you are in control of the schema. Lots of people seem to have found that the XML produced by or required for external sources doesn't match what these methods can do ... we are getting a bit more control with the newest releases, but certainly not enough to overcome all issues. If those methods don't work for you, then what you want to be looking at is SAX. It might seem a little complicated at first because there are a lot of options, but if you just start with something simple and build up it turns out to be very controllable and straightforward to construct. This is actually covered pretty well in the manuals ... except that the examples aren't what I could call good models for production code ... they should get you started though.

This thread is closed