I would like to export 2 access tables as xml, one table holds the header information and the other the details, both need to end up in one xml document, I also need the xsd schema exported, acces gives an example as below but the schema is just a copy of the xml with a different file extension. Any help much appreciated.
access example:
' Create the AdditionalData object.
Set objAD = Application.CreateAdditionalData
' Add the related tables to the object.
With objAD
.Add "Order Details"
objAD(Item:="Order Details").Add "Order Details Details"
.Add "Customers"
.Add "Shippers"
.Add "Employees"
.Add "Products"
objAD(Item:="Products").Add "Product Details"
objAD(Item:="Products")(Item:="Product Details").Add _
"Product Details Details"
.Add "Suppliers"
.Add "Categories"
End With
' Export the Orders table along with the addtional data.
Application.ExportXml acExportTable, "Orders", _
"C:\Orders.xml", "C:\OrdersSchema.xsd", _
"C:\OrdersStyle.xsl", AdditionalData:= objAD
End Sub
access example:
' Create the AdditionalData object.
Set objAD = Application.CreateAdditionalData
' Add the related tables to the object.
With objAD
.Add "Order Details"
objAD(Item:="Order Details").Add "Order Details Details"
.Add "Customers"
.Add "Shippers"
.Add "Employees"
.Add "Products"
objAD(Item:="Products").Add "Product Details"
objAD(Item:="Products")(Item:="Product Details").Add _
"Product Details Details"
.Add "Suppliers"
.Add "Categories"
End With
' Export the Orders table along with the addtional data.
Application.ExportXml acExportTable, "Orders", _
"C:\Orders.xml", "C:\OrdersSchema.xsd", _
"C:\OrdersStyle.xsl", AdditionalData:= objAD
End Sub