mmattson
03-26-2009, 08:41 AM
I am good with DB's and HTML - only played a little with XML. Don't know some of the correct terminology so please correct any misuse of terms.
I am being asked to export data from databases (Access & SQL) to XML files for online data submission. I am initially working with an Access DB. I have created a query that returns the data I need to submit online via a web services (wsdl) URL.
My challenge is to generate an XML file with the appropriate header, entities, namespaces, etc.
The following are excerpts of the first node(s), not complete file.
My current XML export from Access looks something like this:
<?xml version="1.0" encoding="UTF-8"?>
<dataroot xmlns:od="urn:schemas-microsoft-com:officedata" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="XMLtest.xsd" generated="2009-03-25T21:50:33">
<XMLtest>
<UserID>username</UserID>
<Password>password</Password>
<SubmissionCtrlNum>2009326</SubmissionCtrlNum>
<CUSIP9>123456789</CUSIP9>
<InstrumentType>V</InstrumentType>
<TransactionType>I</TransactionType>
<DealerMSRBNum>12345</DealerMSRBNum>
<Date>2009-03-26T00:00:00</Date>
<Time>16:30:00.00</Time>
<InterestRatePeriod>7</InterestRatePeriod>
<NotificationPeriod>7</NotificationPeriod>
<InterestRate>2.53999996185303</InterestRate>
<RateType>R</RateType>
<ParAmountRemarketed></ParAmountRemarketed>
<MinDenomination>100000</MinDenomination>
</XMLtest>
What I need is something like this:
<?xml version="1.0" ?>
<SubmitterInput xmlns="http://www.msrb.org/avts/submitter"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:avts="http://www.msrb.org/avts/common"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xsi:schemaLocation="http://www.msrb.org/avts/submitter SubmitterInput.xsd
http://www.msrb.org/avts/common Common.xsd">
<Submitter>
<avts:UserID>bthompso1234567</avts:UserID>
<avts:SubmitterMessageTimeStamp>
<avts:Date>2008-08-22</avts:Date>
<avts:Time>15:00:00</avts:Time>
</avts:SubmitterMessageTimeStamp>
<avts:SubmissionCtrlNum>2008082200000001</avts:SubmissionCtrlNum>
<avts:InformationType>ResetRate/Liquidity</avts:InformationType>
<avts:Password>password0123456</avts:Password>
</Submitter>
<Transactions>
<Transaction>
<TransactionType>I</TransactionType>
<Instrument>
<avts:CUSIP9>123456AB1</avts:CUSIP9>
<avts:InstrumentType>V</avts:InstrumentType>
</Instrument>
<Dealers>
<avts:DealerMSRBNum>A1234</avts:DealerMSRBNum>
</Dealers>
<RateInformation>
<InterestRateResetDateTime>
<avts:Date>2008-09-22</avts:Date>
<avts:Time>12:00:00</avts:Time>
</InterestRateResetDateTime>
<InterestRatePeriod>7</InterestRatePeriod>
<NotificationPeriod>7</NotificationPeriod>
<InterestRate>4.250</InterestRate>
<MinDenomination>100000</MinDenomination>
<RateType>F</RateType>
<ParAmountRemarketed>45000000</ParAmountRemarketed>
I am being asked to export data from databases (Access & SQL) to XML files for online data submission. I am initially working with an Access DB. I have created a query that returns the data I need to submit online via a web services (wsdl) URL.
My challenge is to generate an XML file with the appropriate header, entities, namespaces, etc.
The following are excerpts of the first node(s), not complete file.
My current XML export from Access looks something like this:
<?xml version="1.0" encoding="UTF-8"?>
<dataroot xmlns:od="urn:schemas-microsoft-com:officedata" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="XMLtest.xsd" generated="2009-03-25T21:50:33">
<XMLtest>
<UserID>username</UserID>
<Password>password</Password>
<SubmissionCtrlNum>2009326</SubmissionCtrlNum>
<CUSIP9>123456789</CUSIP9>
<InstrumentType>V</InstrumentType>
<TransactionType>I</TransactionType>
<DealerMSRBNum>12345</DealerMSRBNum>
<Date>2009-03-26T00:00:00</Date>
<Time>16:30:00.00</Time>
<InterestRatePeriod>7</InterestRatePeriod>
<NotificationPeriod>7</NotificationPeriod>
<InterestRate>2.53999996185303</InterestRate>
<RateType>R</RateType>
<ParAmountRemarketed></ParAmountRemarketed>
<MinDenomination>100000</MinDenomination>
</XMLtest>
What I need is something like this:
<?xml version="1.0" ?>
<SubmitterInput xmlns="http://www.msrb.org/avts/submitter"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:avts="http://www.msrb.org/avts/common"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xsi:schemaLocation="http://www.msrb.org/avts/submitter SubmitterInput.xsd
http://www.msrb.org/avts/common Common.xsd">
<Submitter>
<avts:UserID>bthompso1234567</avts:UserID>
<avts:SubmitterMessageTimeStamp>
<avts:Date>2008-08-22</avts:Date>
<avts:Time>15:00:00</avts:Time>
</avts:SubmitterMessageTimeStamp>
<avts:SubmissionCtrlNum>2008082200000001</avts:SubmissionCtrlNum>
<avts:InformationType>ResetRate/Liquidity</avts:InformationType>
<avts:Password>password0123456</avts:Password>
</Submitter>
<Transactions>
<Transaction>
<TransactionType>I</TransactionType>
<Instrument>
<avts:CUSIP9>123456AB1</avts:CUSIP9>
<avts:InstrumentType>V</avts:InstrumentType>
</Instrument>
<Dealers>
<avts:DealerMSRBNum>A1234</avts:DealerMSRBNum>
</Dealers>
<RateInformation>
<InterestRateResetDateTime>
<avts:Date>2008-09-22</avts:Date>
<avts:Time>12:00:00</avts:Time>
</InterestRateResetDateTime>
<InterestRatePeriod>7</InterestRatePeriod>
<NotificationPeriod>7</NotificationPeriod>
<InterestRate>4.250</InterestRate>
<MinDenomination>100000</MinDenomination>
<RateType>F</RateType>
<ParAmountRemarketed>45000000</ParAmountRemarketed>