Print

Print


Phil,

Parsing the XML from within Access 2000 isn't that hard, because you can use
the DOM to search through the tree.
I've put together a small quick-and-dirty example in Access that parses the
title, author and publisher from one of the example imsmanifest files that
IMS provides. You'll need to have MSXML 4.0 installed for it to work.
The example doesn't do any storing in tables in the database, but that
wasn't the part I wanted to show.
If you only want to retrieve a limited number of fields, you can parse the
XML file very direct like you can see in the code.

The database has one form where you can enter the location of the XML-file
and start the parsing process.
The parcing is done by the "XML Import" module. I also included the
imsmanifest file I used for testing.
Disclaimer: this example is the result of an hour and a half or so work by a
not-professional programmer (everyone knows consultants can't code!).

Pierre Gorissen
IT Consultant

Fontys University of Professional Education
Educational Development Department
P.O. Box 347
NL-5600 AH Eindhoven
The Netherlands

Phone: +31-(0)877 879 369
Fax: +31-(0)877 875 822
Mail: [log in to unmask]
Web: http://www.fontys.nl/
----- Original Message -----
From: "Phil Barker" <[log in to unmask]>
Sent: Thursday, February 20, 2003 11:14 AM
Subject: Re: XML to Database (NLN)


> Hello All, epecially Pierre, Scott and Paul.
>
> The direction which Scott and Pierre suggest is certainly one which I
would
> endorse. A while back I tried building an Access database to illustrate
> what an relational structure for IMS metadata would look like. I quickly
> came to to the conclusion that the complexity of the table structure
> outweighed any advantages of avoiding data duplication etc.
>
> So, if you do only store selected parts of the metadata in a relational
> structure, the questions is: how do you parse the content package to
> extract the metadata you want to import? If anyone knows of publicly
> available scripts/routines/packages/code whatever for doing this then
> please share!
>
>
> Also, the alternative approach is always to get an entire system someone
> else has developed. So if it would be interesting to hear from anyone  who
> knows of a repository system which could help with making NLN content
> packages available on an intranet. I realise that obtaining such a sytem
> might mean spending money, so if you're selling a system which would help
> you can also let us know what it is. I don't want unsolicited advertising
> on this list, but if you can offer something that helps with a direct
query
> I don't care whether you charge for it or not.  [I know of a couple of
> systems, but don't want to appear to be giving them preferential
treatment,
> so I'll give other people a chance to have their say first].
>
>
> Phil.
>
> --
> Phil Barker                            Learning Technology Advisor
>       ICBL, School of Mathematical and Computer Sciences
>       Mountbatten Building, Heriot-Watt University,
>       Edinburgh, EH14 4AS
>       Tel: 0131 451 3278    Fax: 0131 451 3327
>       Web: http://www.icbl.hw.ac.uk/~philb/
>