XML Export using XSLT

smbarney

Registered User.
Local time
Today, 04:03
Joined
Jun 7, 2006
Messages
60
I generally don't just ask very general help questions but I am at a loss. Using 2007, I need to export a table/query to specific xml format. The vendor has provided an xsd file. However, I need to transform the table in Access into the xml format required.

From what I understand, I need to use an xslt file to map the table fields to the xml field. However, I have no idea how to build one that will do this.

My table has the following fields:

FirstName
LastName
DOB
COB
AdminDate
PersonType


For each row, I need output to a single xml file that looks like this:
<person>
<PersonFirstName></PersonFirstName>
<PersonLastName></PersonLastName>
<DateofBirth> </DateofBirth>
etc...
</person>

The table contains 50 fields all of which have to be exported. If I understand things correctly, using an xslt file to transform the table would be the easiest. I am just not sure how to go about it.

Is there a tool to create the xslt? Can I use the xsd file?
Thanks.
 
Did you try the export wizard? Did you try the ExportXML method? From your example, I don't quite see what it should be more complicated than that. You can always rename the fields in a query.
 
Yes I did try the wizard. However, it does not come out in the correct syntax. Renaming the fields wouldn't work either given the complexity of the xml schema I need to go to.

I know I can code the xml using the print command in VB. However, that is a very tedious process. I assumed that that there would be some easier method via XSLT.
 
I am lost. If the few XML -lines you showed cover it, then where is the complex bit?
 
I didnt post the entire xml structure. For reasons that I can't go in to, I can't cut and past it so I would have to hand type it in. I just typed out the first few lines.
 
Okaay.

I have no clue how to go about an XSLT transform.

While waiting for better advice, I would google for tools, tutorials. If you have the time. If not, and provided the required schema is fixed for perpetuity, then sticking with the familiar tools might be faster: print the thing yourself line by line.
 

Users who are viewing this thread

Back
Top Bottom