Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Professional SQL Server 2005 Integration Services ISBN: 0-7645-8435-9
This is the forum to discuss the Wrox book Professional SQL Server 2005 Integration Services by Brian Knight, Allan Mitchell, Darren Green, Douglas Hinson, Kathi Kellenberger, Andy Leonard, Erik Veerman, Jason Gerard, Haidong Ji, Mike Murphy; ISBN: 9780764584350
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional SQL Server 2005 Integration Services ISBN: 0-7645-8435-9 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old April 1st, 2008, 09:54 PM
Cha Cha is offline
Registered User
Join Date: Apr 2008
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Import a XML file into SQL Server tables

I am trying to import a XML file to SQL Sever tables using SSIS Data Flow task --> XML Source (I have a XML file and a XSD file).

The XML file looks like this:

<mc MajCmd="Atlantic">
  <r Region="East">
    <i Installation_UIC="M00146" Installation_Name="MCA Point">
      <bc BC="111" BC_Title="Air Runways">
        <c Restoration_Cost_C3="0.0000" Comment="" />

and the XSD file looks like this:
<?xml version="1.0" encoding="utf-8"?>
<xs:schema id="NewDataSet" xmlns="" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
  <xs:element name="mc">
        <xs:element name="r" minOccurs="0" maxOccurs="unbounded">
              <xs:element name="i" minOccurs="0" maxOccurs="unbounded">
                    <xs:element name="bc" minOccurs="0" maxOccurs="unbounded">
                          <xs:element name="c" minOccurs="0" maxOccurs="unbounded">

                        <xs:attribute name="BC" type="xs:string" />
                        <xs:attribute name="BC_Title" type="xs:string" />
                  <xs:attribute name="Installation_UIC" type="xs:string" />
                  <xs:attribute name="Installation_Name" type="xs:string" />
            <xs:attribute name="Region" type="xs:string" />
      <xs:attribute name="MajCmd" type="xs:string" />
  <xs:element name="NewDataSet" msdata:IsDataSet="true" msdata:UseCurrentLocale="true">
      <xs:choice minOccurs="0" maxOccurs="unbounded">
        <xs:element ref="mc" />

I created 5 tables (mc, r, i, bc and c)form the extraction of the XML file. My problem is the mc table is empty after the extraction.

Could someone please tell me why this is happening? And how to solve this problem, so I can transfer all the data to SQL tables?

Thanks for your help!


Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to import .MDF file into SQL Server Enterprise shong BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 4 July 23rd, 2008 11:51 AM
How to import XML into SQL Server dbellavi XML 1 February 26th, 2008 06:02 AM
Import delimited flat file into SQL Server 2000 DevCsharp C# 1 April 27th, 2005 11:52 PM
Import XML and its attribute into SQL server 2000 khautinh C# 0 April 13th, 2005 09:57 AM
import text file to SQL Server DB via DTS pabloron SQL Server 2000 0 July 31st, 2003 06:41 PM

All times are GMT -4. The time now is 11:29 PM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.