Hello, is it possible to change the name of my table tag when I'm exporting an XML file through VBA?
Exported file looks like this
I want this
Is it possible to change it in the code somehow? I can't change the name of the table because of the convention.
Or generally how to set the name of the tags not from the table but custom.
Like this
My VBA code looks like this
Table tbl_xml is the first tag part and the table tbl_xml_ct is a nested table.
Thank you
Exported file looks like this
XML:
-<tbl_xm_ct>
<ID>44</ID>
<desc>pol 3</desc>
<phone>111155</phone>
</tbl_xm_ct>
I want this
XML:
-<xml_contacts>
<ID>44</ID>
<desc>pol 3</desc>
<phone>111155</phone>
</xml_contacts>
Is it possible to change it in the code somehow? I can't change the name of the table because of the convention.
Or generally how to set the name of the tags not from the table but custom.
Like this
XML:
-<xml_contacts>
<ID>44</ID>
<description>pol 3</desc>
<phoneNumber>111155</phone>
</xml_contacts>
My VBA code looks like this
Code:
Dim contacts As AdditionalData
Dim filter As String
Set contacts = Application.CreateAdditionalData
contacts .Add "tbl_xm_ct"
filter = Me.ID
Application.ExportXML ObjectType:=acExportTable, DataSource:="tbl_xm", _
DataTarget:="C:\Users\...\test.xml", _
WhereCondition:="ID=" & filter, _
AdditionalData:=contacts
Table tbl_xml is the first tag part and the table tbl_xml_ct is a nested table.
Thank you