It’s very simple generate a XML in Progress ABL.
In my opinion with PRODATASET is the easier way.

This is a sample how to generate a XML with prodataset (just five lines of code).

DEFINE TEMP-TABLE tt-mytable LIKE MYTABLE.
DEFINE DATA-SOURCE srcMytable FOR MYTABLE.
DEFINE DATASET dsMytable FOR tt-mytable.

BUFFER tt-Mytable:ATTACH-DATA-SOURCE(DATA-SOURCE srcMytable:HANDLE).

DATASET dsMytable:FILL().
DATASET dsMytable:WRITE-XML (‘FILE’,’myfile.xml’, TRUE).

Quite ahn?…­čśÇ