Solved

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

Posted on 2006-11-29
3
215 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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

In Debugging – Part 1, you learned the basics of the debugging process. You learned how to avoid bugs, as well as how to utilize the Immediate window in the debugging process. This article takes things to the next level by showing you how you can us…
I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
Familiarize people with the process of utilizing SQL Server stored procedures from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Micr…
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…

762 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

18 Experts available now in Live!

Get 1:1 Help Now