I might extend on Sabin's answer a bit with respect to modifying the XML output and enhancing the exported information as suggested in the initial post. Using XSL as suggested for transformation would be one approach to transform to a different format using the given information in the initial XML provided through the export.
In case the exported information is insufficient (as in the example snipplet) and needs extension, this can be done by modifying and adapting the AdoScript files producing the XML in ADOxx. As part of the platform distribution you can find the AdoScript files responsible for importing and exporting XML information through the user interface ("Import/Export" component -> "Model" -> "XML Import (default)" or "XML Export (default)") in the installation directory of ADOxx (should be %PROGRAM FILES%\BOC\ADOxx13_EN_SA.
The following files are available in the directory to triggered during the XML export:
- xmlexp3012.asc
- xmlexp3012_procs.asc
The following files are available in the directory to trigger the XML import:
- xmlimp3012.asc
- xmlimp3012_globals_meta.asc
- xmlimp3012_preprocs.asc
- xmlimp3012_procs.asc
- xmlimp3013.asc
- xmlimpexp3012_globals_de.asc
- xmlimpexp3012_globals_en.asc
- xmlimpexp3012_globals_meta.asc
In order to have the modification as described in the question, we can modify the procedure
XMLEXP_PRINTATTRIBUTEin
xmlexp3012_procs.asc which is responsible for writing attributes to the output. The modification to add attribute IDs relates to adding the following statement for the different types RECORD, INTERREF, and all other ATTRIBUTES.
1CC "Documentation" XML_WRITEATTRIBUTE "id" value: (STR n_attrid)
2#--> RESULT ecode:intValue
3SETL n_ecode: (ecode)
4
5IF (n_ecode != 0) {
6 CC "AdoScript" ERRORBOX ("[axmlexp-24.1]\n" +
7 c_g_str_xml_xml_writeattribute_1 + "id" +
8 c_g_str_xml_xml_writeattribute_2 + str_attrtype +
9 c_g_str_xml_xml_writeattribute_3 +
10 c_g_str_xml_error + STR n_ecode)
11 #--> RESULT endbutton:strValue
12 SETL b_thisxmlexp_aborted:1
13 EXIT
14}
Please find attached the updated AdoScript - in order to install the update, download the file and overwrite the AdoScript in the installation directory. After a restart the export is enhanced with attribute IDs.