plaiditude
Technical User
I need to create/modify an XML export from an MS Access 2007 table. I'm hoping someone can point me in the right direction.
We have done this before with other tables where there is only one transaction allowed per account. Very basiclly it looks something like: (very simplified, there are many sub elements)
<TRANS_SLP>
<TRANSACTION_DATA>
</TRANSACTION_DATA>
<ACCOUNT_INFO>
</ACCOUNT_INFO>
</TRANS_SLP>
This new table that I have to report on has multiple rows/transactions per account. So when I export to XML it looks something like this for one account:
<TRANS_SLP>
<TRANSACTION_DATA>
</TRANSACTION_DATA>
<ACCOUNT_INFO>
</ACCOUNT_INFO>
</TRANS_SLP>
<TRANS_SLP>
<TRANSACTION_DATA>
</TRANSACTION_DATA>
<ACCOUNT_INFO>
</ACCOUNT_INFO>
</TRANS_SLP>
So it completely repeats the whole thing. What I want to end up with is just the transaction data repeating for each transaction like this:
<TRANS_SLP>
<TRANSACTION_DATA>
</TRANSACTION_DATA>
<TRANSACTION_DATA>
</TRANSACTION_DATA>
<TRANSACTION_DATA>
</TRANSACTION_DATA>
<ACCOUNT_INFO>
</ACCOUNT_INFO>
</TRANS_SLP>
What is the best method to do something like this? Is this something I can do with XSLT, do I need to add some code to MS Access and programatically export to XML? I would classify myself as a beginner at this (I did COBOL programming 8 years ago - not much help with this I've done some coding in MS Access before but have never done anything in XML. I'm reading the tutorials to understand some basics but I'm not sure where to begin with this) Hopefully my question makes some sense, THANKS for any help!
We have done this before with other tables where there is only one transaction allowed per account. Very basiclly it looks something like: (very simplified, there are many sub elements)
<TRANS_SLP>
<TRANSACTION_DATA>
</TRANSACTION_DATA>
<ACCOUNT_INFO>
</ACCOUNT_INFO>
</TRANS_SLP>
This new table that I have to report on has multiple rows/transactions per account. So when I export to XML it looks something like this for one account:
<TRANS_SLP>
<TRANSACTION_DATA>
</TRANSACTION_DATA>
<ACCOUNT_INFO>
</ACCOUNT_INFO>
</TRANS_SLP>
<TRANS_SLP>
<TRANSACTION_DATA>
</TRANSACTION_DATA>
<ACCOUNT_INFO>
</ACCOUNT_INFO>
</TRANS_SLP>
So it completely repeats the whole thing. What I want to end up with is just the transaction data repeating for each transaction like this:
<TRANS_SLP>
<TRANSACTION_DATA>
</TRANSACTION_DATA>
<TRANSACTION_DATA>
</TRANSACTION_DATA>
<TRANSACTION_DATA>
</TRANSACTION_DATA>
<ACCOUNT_INFO>
</ACCOUNT_INFO>
</TRANS_SLP>
What is the best method to do something like this? Is this something I can do with XSLT, do I need to add some code to MS Access and programatically export to XML? I would classify myself as a beginner at this (I did COBOL programming 8 years ago - not much help with this I've done some coding in MS Access before but have never done anything in XML. I'm reading the tutorials to understand some basics but I'm not sure where to begin with this) Hopefully my question makes some sense, THANKS for any help!