So I have written on the joins and left joins etc.. for this xml project I am working on. However I am having some hell of a time with the XML portion. I can get all the data into a dataset. However I can't get the data to output the xml the way I would like to.
The TransactionTable left joins with the TimeEntry table on the transactionID . 1 to many the TransactionTable inner joins to the ClientTable 1 to 1
Data all comes out nicely with the left and inner join on my select statement. All data is there.
However I need it to output in the XML format I need. Can't figure out how to do it. Got close but everytime I get close I run into another roadblock.
see picture attached as well  
<receivableInvoices>
<receivableInvoice refId="RECEIVABLEINVOICE-REFID-123">
<customerCompanyName>Acme Corp</customerCompanyName>
<customerEmailAddress>jane.doe@acme.com</customerEmailAddress>
<invoiceNumber>123456</invoiceNumber>
<invoiceDate>2014-05-01</invoiceDate>
<billTo>
<address>
<line1>Acme Corp</line1>
<line2>123 Main Street</line2>
<line3>STE 100</line3>
<line4>Attn: Shipping</line4>
<city>Maitland</city>
<stateProvince>FL</stateProvince>
<postalCode>32751</postalCode>
<country>US</country>
</address>
<contact>
<name>Jane Doe</name>
<phoneNumber>555-555-5555</phoneNumber>
</contact>
</billTo>
<lineItems>
<lineItem>
<lineNumber>1</lineNumber>
<hours>75.00</hours>
<description>Description of the line item goes here.</description>
</lineItem>
</lineItems>
</receivableInvoice>
<receivableInvoices>
No comments:
Post a Comment