PDA

View Full Version : noob needs help w database of projects, each having its own nested list of images


oompa_l
07-14-2010, 03:00 PM
i have the relational database setup with a main table for projects, and another for images. The projects table refers to a number of other tables :client, location, type etc etc. Each image will refer to a project in that table but this column will have duplicate entries. Each project then has multiple images associated with it.

What I'm stuck on specifically at this moment is how to get the following XML structure to be pumped out of Access. I dont knwo where in the workflow it happens. There doesnt appear to be any options for this sort of thing in the XML export process. I'm wondering if it's done in Access or if it happens through some sort of remapping of the XML after the fact.

<Prjct>
<Number></Number>
<Name></Name>
<Date></Date>
<Client></Client>
<Type></Type>
<Scope></Scope>
<Remarks></Remarks>
<Description></Description>

<Location>
<City></City>
<Province></Province>
<Country></Country>
</Location>

<Images>
<Image>
<Thmb></Thmb>
<Img></Img>
<Ttl></Ttl>
<Cptn></Cptn>
</Image>
<Image>
<Thmb></Thmb>
<Img></Img>
<Ttl></Ttl>
<Cptn></Cptn>
</Image>
<Ima.....
</Images>

</Prjct>
<Prj.....


What I currently have is a query where each line refers to an image and consequently the XML comes out with each image representing the primary child node. I want the projects to be the main nodes, the images being nested within each and no project identification being duplicated.

any ideas how this would be done?

SusanH
07-15-2010, 04:26 PM
Hi -

I'm no longer an access user but maybe this (http://office.microsoft.com/en-gb/access-help/export-access-data-as-xml-HP003091293.aspx) info will help.

oompa_l
07-15-2010, 04:29 PM
totally appreciate the attempt but i need a different sort of response. ..i know how to export XML but i dont know to do it with my schema...if you dont know access it shouldnt matter - it's the principle of taking one list, a table and pumping out an xml where each entry has an inner nested list