Solved

How to import XML data from Memo field or String expression into Access.

Posted on 2006-11-29
3
216 Views
Last Modified: 2011-10-03
How do I  transform XML data from a memo field (or string expression) to corresponding fields in my access table?

Sample XML Data from memo field:

<?xml version="1.0" encoding="utf-16"?>
<AddressBook>
   <Address>
      <ID>-1</ID>
      <FirstName>Jim</FirstName>
      <LastName>Anderson</LastName>
      <CompanyName>Acme Corp</CompanyName>
      <StreeLine1>123 1st Ave</StreeLine1>
      <StreetLine2>suite 100</StreetLine2>
      <City>Edina</City>
      <StateName>Minnesota</StateName>
   </Address>
</AddressBook>

0
Comment
Question by:caramelcooker
  • 2
3 Comments
 
LVL 44

Accepted Solution

by:
Leigh Purvis earned 125 total points
ID: 18036634
You could save the text in your field as a file - and use the inbuilt import method to grab the data.
(If in Access 2002/2003/2007).

Or you could load the text in code and use the MSXML object library to do it the more controlled way.
A pretty generic example of which is here
http://www.experts-exchange.com/Q_21990088.html
0
 
LVL 44

Expert Comment

by:Leigh Purvis
ID: 18040078
Need anything further or is that enough to be going on with?

Want an example of the first method - or have you gone with door number 2? :-)
0
 

Author Comment

by:caramelcooker
ID: 18040193
2nd option is the cleanest.  

I will build a table with the field names necessary and enumerate through their names having the results go to the sample code at the link you provided which will ultimately end up as the data for those fields.  MSXML6.0 it is!  Thank You for a timely response.
0

Featured Post

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It took me quite some time to sort out all the different properties of combo and list boxes available from Visual Basic at run-time. Not that the documentation is lacking: the help pages are quite thorough and well written. The problem was rather wh…
Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now