[AccessD] Importing an XML file

Francisco Tapia fhtapia at gmail.com
Tue Mar 4 18:31:47 CST 2008


I have an XML file that looks like this:
<Answers>
  <AnswerSet>
    <Answer questionId="DEALER_NAME">TEST</Answer>
    <Answer questionId="PHONE">5551231212</Answer>
    <Answer questionId="CALLNO">300122598</Answer>
    <Answer questionId="SERVICETECH_NAME">SvcTech1</Answer>
    <Answer questionId="Question1">Yes</Answer>
    <Answer questionId="question2">Yes</Answer>
    <Answer questionId="question3">Yes</Answer>
    <Answer questionId="Question4">Test</Answer>
  </AnswerSet>
  <AnswerSet>
    <Answer questionId="DEALER_NAME">Test21</Answer>
    <Answer questionId="PHONE">5551231212</Answer>
    <Answer questionId="CALLNO">300120902</Answer>
    <Answer questionId="SERVICETECH_NAME">SvcTech2</Answer>
    <Answer questionId="Question1">Yes</Answer>
    <Answer questionId="question2">Yes</Answer>
    <Answer questionId="question3">No</Answer>
    <Answer questionId="Question4">Test</Answer>
  </AnswerSet>
  <AnswerSet>
    <Answer questionId="DEALER_NAME">Test3</Answer>
    <Answer questionId="PHONE">5551231212</Answer>
    <Answer questionId="CALLNO">300121480</Answer>
    <Answer questionId="SERVICETECH_NAME">SvcTech3</Answer>
    <Answer questionId="Question1">Yes</Answer>
    <Answer questionId="question2">Yes</Answer>
    <Answer questionId="question3">Yes</Answer>
    <Answer questionId="Question4">No Comment</Answer>
  </AnswerSet>
</Answers>


I'd like to import this XML to a table in Access table that reads:
Dealer_name
Phone
CallNo
ServiceTech_Name
Question1
Question2
Question3
Question4

I tried the default import but for some reason it only imports the first
set?



-- 
-Francisco
http://sqlthis.blogspot.com | Tsql and More...



More information about the AccessD mailing list