Senin, 31 Juli 2023

Re: [MSAccessProfessionals] Import XML file

Valentino, there is probably also an XML header file but you didn't specify that -- do you have one? Excel brings everything in as flat data whereas Access should separate data into different tables. This isn't an easy task!

kind regards,
crystal

On 29/07/2023 4:20 am, avvisati wrote:

 

Yes I understand this, this is why I asked for help since I'm not an expert

I know that there are two ways to go on:

 

  1. Transform the XML from attribute centric like this one  to element centric using xls language- file

And transform from an XML as this one  

 

<person sex="female">

  <firstname>Anna</firstname>

  <lastname>Smith</lastname>

</person>

 

Try to get something like this one

<person>

  <sex>female</sex>

  <firstname>Anna</firstname>

  <lastname>Smith</lastname>

</person>

And after import because the Element centric is compatible with Access

 

 

  1. The other way is read informatio using VBA, and I wanted to try this

I tried  to google and try to get some example like this one

But I do not succeded  to get the information, or better I can  I can retrive some informaton but but

 

This is why  I ask support of somebody can give some preatical indicatoin where to see

 

 

 

 

From: MSAccessProfessionals@groups.io <MSAccessProfessionals@groups.io> On Behalf Of Arnelito Puzon
Sent: Saturday, July 29, 2023 5:02 AM
To: MSAccessProfessionals@groups.io
Subject: Re: [MSAccessProfessionals] Import XML file

 

it is obvious that the xml file is not a well-formed access xml file so it is

not being imported. you need special VBA to create a structure for those

fields in your xml.

 

On Sat, Jul 15, 2023 at 5:25 PM avvisati <valentino.avvisati@gmail.com> wrote:

Hello All, 

i need to import one XML file to access, I can open it with no problem in excel and after import but I would like to import directly in Access 

The problem is that when I import using the XML importation of Access, are created some table but empty and I understand  probably the problem is that the file I want to open,  is based on attribute but should be based on element 

I also read that I first should transform the file to a Element based file and after i can import. 

I tried  to creatine xsl file but with no success 

somebody can give me some indication and eventually suggest some tool?

I do not know XML 

thank you 

Valentino 



Tidak ada komentar:

Posting Komentar