Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Creating XML file using Excel Data Expand / Collapse
Author
Message
Posted Friday, September 18, 2009 8:20 AM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Thursday, May 9, 2013 9:57 AM
Points: 322, Visits: 718
I need to create an XML file populated by data from a CSV file.

I have the following XMLSchema template:

<?xml version="1.0" encoding="UTF-8"?>
<DataMarketsFeed xmlns="http://www.test.co.uk/XMLSchema/DataMarketsFeed-v1-1"
xmlns:cmn="http://www.test.co.uk/XMLSchema/DataFeedCommon-v1-2"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<DataFeedHeader xmlns="http://www.test.co.uk/XMLSchema/DataFeedCommon-v1-2">
<FeedTargetSchemaVersion>1.1</FeedTargetSchemaVersion>
<Submitter>
<SubmittingFirm>123456</SubmittingFirm>
<SubmittingDept>IIBS</SubmittingDept>
</Submitter>
<ReportDetails>
<ReportCreationDate>2009-03-12</ReportCreationDate>
<ReportIdentifier>March09</ReportIdentifier>
</ReportDetails>
</DataFeedHeader>
<DataMarketsFeedMsg>
<CoreItemsMkt xmlns="http://www.Test.co.uk/XMLSchema/DataMarketsFeed-v1-1">
<FirmDataRef>123789</FirmDataRef>
<TransRef>123789</TransRef>
<Cancellation>false</Cancellation>
<Status>N</Status>
</CoreItemsMkt>
<Transaction>
<ReportingFirmId>
<ReportingFirmCode type="R">123456</ReportingFirmCode>
</ReportingFirmId>
<TradingDate>2009-02-27</TradingDate>
<TradingTime>08:02:00</TradingTime>
<BuySell>B</BuySell>
<TradingCapacity>P</TradingCapacity>
<InstrumentDesc>Stock</InstrumentDesc>
<TypeOfInstrument>I</TypeOfInstrument>
<MaturityExerciseDeliveryDate>2009-03-31</MaturityExerciseDeliveryDate>
<TypeOfDerivative>F</TypeOfDerivative>
<PriceMultiplier>10</PriceMultiplier>
<UnitPrice>3836</UnitPrice>
<PriceNotation>GBP</PriceNotation>
<Quantity>3</Quantity>
<CounterpartyOne>
<CounterpartyCode type="I">QWERTYU</CounterpartyCode>
</CounterpartyOne>
<VenueIdentification>XXXX</VenueIdentification>
</Transaction>
</DataMarketsFeedMsg>
</DataMarketsFeed>

All the data highlighted in BOLD above will come from an excel (csv) file.

At the moment as a work around im using a MS Word Mail Merge, this is not ideal, can his be done using a SSIS package?
Post #790425
Posted Monday, September 21, 2009 4:29 AM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Thursday, May 9, 2013 9:57 AM
Points: 322, Visits: 718
Any suggestions?
Post #791020
Posted Tuesday, September 22, 2009 6:44 AM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: 2 days ago @ 6:06 AM
Points: 60, Visits: 890
Can you send a sample of the CSV file.

Are you updating the XML or creating new records?
Post #791719
Posted Wednesday, September 23, 2009 1:06 AM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Thursday, May 9, 2013 9:57 AM
Points: 322, Visits: 718
I have attached the XML DATA FILE (CSV).
The final CSV will be updated manually every day.

After the update I was to convert it to the XML file.


Thanks


  Post Attachments 
xmldatafile.xls (15 views, 13.50 KB)
Post #792385
Posted Wednesday, May 8, 2013 8:34 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Wednesday, September 18, 2013 3:45 AM
Points: 9, Visits: 35
Hi Friend

I believe you are creating this xml file for FSA report purpose and i have to create the same file. Can you please help me on this.

Many thanks
VJ
Post #1450611
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse