Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to export a Access dataset to a XML file with a certain format?

Status
Not open for further replies.

kre1973

IS-IT--Management
May 5, 2006
47
US
I want to export data from my Access dataset to a XML file with the following format concept.

<?xml version="1.0" standalone="yes" ?>
- <UMZ>
- <ServerID>
<Server>PDS_SY1</Server>
<PreCS>servconnEmergencyShutdown servconnShutdown</PreCS>
<PostCS>servconnStartup</PostCS>
<PreMVS>N/A</PreMVS>
<PostMVS>N/A</PostMVS>
<Misc>N/A</Misc>
<Date_Stamp>06/09/2007</Date_Stamp>
</ServerID>
- <ServerID>
<Server>PDS_SY10</Server>
<PreCS>N/A</PreCS>
<PostCS>N/A</PostCS>
<PreMVS>N/A</PreMVS>
<PostMVS>N/A</PostMVS>
<Misc>N/A</Misc>
<Date_Stamp>06/09/2007</Date_Stamp>
</ServerID>
- <ServerID>
<Server>PDS_SY11</Server>
<PreCS>personelMondayAM3</PreCS>
<PostCS>personelMondayAM4</PostCS>
<PreMVS>N/A</PreMVS>
<PostMVS>N/A</PostMVS>
<Misc>N/A</Misc>
<Date_Stamp>06/09/2007</Date_Stamp>
</ServerID>
- <ServerID>
<Server>PDS_SY12</Server>
<PreCS>N/A</PreCS>
<PostCS>N/A</PostCS>
<PreMVS>N/A</PreMVS>
<PostMVS>N/A</PostMVS>
<Misc>N/A</Misc>
<Date_Stamp>06/09/2007</Date_Stamp>
</ServerID>
</UMZ>


Thanks

 
You could create a Schema with the layout above, then upload that to a dataset. You could then copy the data across from your Access dataset to the new one, and then export the xml without the schema (It is an option on the export function).

You may need to adjust it so that the schema namespace doesn't show up in the export.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top