Import XML File In Access 2010
Today databases contain data in incompatible formats, which eventually begets the problem of exchanging data between systems over the internet. Converting data in to XML can mitigate the probable of encounter incompatibility problem. XML is use to store data in files or in databases, and through Access 2010 you can retrieve data from XML files for performing advance operations over it.
XML is made up of well structured table, it contains disparate data with parents and child nodes disperse in the document. XML supports user-defined tags, so there are no rules or constraints to follow.
To start off with lets get familiar with its structure.
<?xml version="1.0" standalone="yes"?>
<Catalog> {lines of code}
</Catalog>
Here is an example of XML file
To import this file in to Access 2010, launch the application, head over to External Data tab and click XML File.
In Get External Data dialog, choose the XML file you want to import, and click OK.
A dialog will appear, which show the content of the XML file in a well structured tree format. By using Import Options you can also import only the structure of the data. Enable Structure and Data to import Data with its structure. Click OK to start importing.
XML data file is successfully imported in to Access as shown in the screenshot below. Open Design View to apply desired constraints over data fields.
This does not work for me. all I get is one Field with nothing in it.
This works fine to me, however in my case I created a asp page to provide the XML file dinamically from an external webpage.
Unfortunately this method does not provide a “data-Link” to the file, so I had to automate, with VBA, the deletion of the imported XML file and import again everytime I want to have fresh data.
This is not what happens to me I get one field with all of the headings in it. Did you create the fields first?