When having XML Documents or XML Schemas which are being imported through ABL, the XML-NODE-NAME or SERIALIZE-NAME attributes on a ProDataSet object handle, temp-table object, temp-table buffer object, or buffer field object allow you to specify an XML element (or attribute) name for the ABL object.
Following an example on how to achieve this:
Consider having an XML string like following: "<A><B>Red</B><B>Green</B></A>", which contains no additional info.
The goal is to have a temp-table (buffer name A) which has 1 field (B) and 2 records ("Red" and "Green").
Use the READ-XML method as follows:
DEFINE VARIABLE lcc AS LONGCHAR INIT "<A><B>Red</B><B>Green</B></A>".
DEFINE TEMP-TABLE ttb SERIALIZE-NAME "B"
FIELD cc AS CHAR XML-NODE-TYPE "text".
DEFINE DATASET dsa SERIALIZE-NAME "A" FOR ttb.
DATASET dsa:READ-XML( "longchar", lcc, ?, ?, ? ).
FOR EACH ttb:
MESSAGE ttb.cc VIEW-AS ALERT-BOX.
END.