Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Export from Access an XML with related table info

Status
Not open for further replies.

jmj

Programmer
Oct 4, 2001
122
US
Hi. I need to make an xml file of all the courses the teachers teach. I am currently doing this from an Access database (If it works easier in sql let me know and I can move the data there). It needs to be in an exact format to be used by some palm software. My problem is I can not seem to export the info and the related tables as such (ie: a subject table lists all the subjects), it just prints out as a field.
For example I want my data to look like this as a finihed product:
<Teacher FirstName="Harry" LastName="Wells">
<Grades>
<Grade Name="10"/>
</Grades>
<Subjects>
<Subject Name="Biology, HON"/>
<Subject Name="Biology, STD"/>
</Subjects>
</Teacher>

But it looks like this:
<Teachers>
<FirstName>TRACY</FirstName>
<LastName>SUMMERS</LastName>
<Grade></Grade>
<Subject>ALGEBRA</Subject>
</Teachers>

Any ideas how to massage the export? Thanks,
J
 
Use XSL. Give a bit more info on your access output and final desired xml

Jon

"I don't regret this, but I both rue and lament it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top