Solved

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

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

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

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

The first two articles in this short series — Using a Criteria Form to Filter Records (http://www.experts-exchange.com/A_6069.html) and Building a Custom Filter (http://www.experts-exchange.com/A_6070.html) — discuss in some detail how a form can be…
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…
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

822 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