Hello, I earlier posted this same question at Adobe Support Community (AEM 6.5 xml file generation with attributes of eac... - Adobe Support Community - 14022424), but my message was LOCKED! We are a paying customer of adobe with licenses to Adobe Acrobat DC, Pro, Designer, etc. So not sure why I was locked, hence no one was able to answer the question.
Anyway, I am working on a dynamic form and using AEM 6.5 to build it. I have an export data button that when clicked, exports the data saved in the form to an xml with its corresponding elements. To be more precise, I have the following for exporting:
xfa.host.exportData("",0);
The generated xml file looks like the following. It has the elements tags and any value stored in the corresponding textfield, or checkbox, etc.
<?xml version="1.0" encoding="UTF-8"?>
<root>
<ApplicationType>
<ATRadioButton100>1</ATRadioButton100>
<ATRadioButton050>1</ATRadioButton050>
<ADTextField170>345-908-7888</ADTextField170>
<ADTextField190>Engineer</ADTextField190>
..
..
What I would like to do is that when the xml is generated, it also includes an attribute for each element. For example:
<ADTextField170 name="phone">345-908-7888</ADTextField170>
Is it possible in AEM to set attributes for each object (e.g. textfield, radiobutton) that are then listed as part of the xml which is generated using the exportData function. If not, is there any other way to create an xml that contains data plus attribute(s) of each element. The reason being is that this way our clients will know what each element (textfield, radiobutton, checkbox, dropdown) variable is for by looking at its name attribute.
Thank you in advance.