Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SSIS and Import/Export (2005)
 XML Source - What about the root element?

Author  Topic 

IceDread
Yak Posting Veteran

66 Posts

Posted - 2008-04-07 : 04:57:22
Greetings!

Why does XML Source in MS VS 2005 Integration Services Data Flow Sources XML Source not pick up the root element?

The problem is the following example:
<root createddate="2008-01-01">
<elements>
...
</elements
</root>

The XML Source picks up everything after the first element which is the root element but it does not seam to pick up the root element where there is a need for the createddate attribute.

Is there a soultion for this problem or a workaround?

Thanks for help.

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2008-04-07 : 05:01:28
Maybe you can create a single element for creation information?
<root>
<create date="2008-01-01">
<elements>
...
</elements
</root>


E 12°55'05.25"
N 56°04'39.16"
Go to Top of Page

IceDread
Yak Posting Veteran

66 Posts

Posted - 2008-04-07 : 05:53:14
Thanks for the tipp but I'm on the recieving end of it and not the one creating the files so it would be nice if I somehow could access the root element just as it is, it's standard xml after all, should be possible somehow.
Go to Top of Page

IceDread
Yak Posting Veteran

66 Posts

Posted - 2008-04-07 : 06:47:14
I can add, I use a schema, generated after the xml file by vs. In this schema the attribute
<xs:attribute name="createddate" type="xs:date" use="optional" />
is there so it's quite strange that the xml source does not pick it up.
Go to Top of Page

IceDread
Yak Posting Veteran

66 Posts

Posted - 2008-04-08 : 10:40:31
Noone?
Go to Top of Page
   

- Advertisement -