Home > Archive > MS SQL XML > October 2006 > SQLXMLBulkLoad & Stream









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author SQLXMLBulkLoad & Stream
Zamdrist

2006-10-24, 6:49 pm

In Microsoft "Guidelines & Limitations" (http://tinyurl.com/lwdm2) is
says:

If you have an inline schema in the source XML document, XML Bulk Load
ignores that schema. You specify the mapping schema for XML Bulk Load
external to the XML data. You cannot specify the mapping schema at a
node by using the xmlns="x:schema" attribute.

If you look at:

http://www.treas.gov/offices/enforc...fac/sdn/sdn.xml

It appears as those this *is* an inline schema correct? Please forgive
my ignorance in XML.

Thank you,

Steve

Monica Frintu [MSFT]

2006-10-24, 6:49 pm

Hello,

The inline schema in an xml document looks like in this example :

<xs:schema xmlns:xs='http://www.w3.org/2001/XMLSchema'
xmlns='xsdHeadCount'

targetNamespace='xsd
HeadCount'>
<xs:element name='HeadCount'>
<xs:complexType>
<xs:sequence>
<xs:element name='Name' type='xs:string'
maxOccurs='unbounded
'/>
</xs:sequence>
<xs:attribute name='division' type='xs:string' use='optional'
default='QA'/>
</xs:complexType>
</xs:element>
</xs:schema>
<hc:HeadCount xmlns:hc='xsdHeadCou
nt'>
<Name>Waldo Pepper</Name>
<Name>Red Pepper</Name>
</hc:HeadCount>

This is not supported by bulkload.
"You specify the mapping schema for XML Bulk Load external to the XML data.
You cannot specify the mapping schema at a node by using the xmlns="x:schema"
attribute."

I hope this helps.

Best regards,
--
Monica Frintu


"Zamdrist" wrote:

> In Microsoft "Guidelines & Limitations" (http://tinyurl.com/lwdm2) is
> says:
>
> If you have an inline schema in the source XML document, XML Bulk Load
> ignores that schema. You specify the mapping schema for XML Bulk Load
> external to the XML data. You cannot specify the mapping schema at a
> node by using the xmlns="x:schema" attribute.
>
> If you look at:
>
> http://www.treas.gov/offices/enforc...fac/sdn/sdn.xml
>
> It appears as those this *is* an inline schema correct? Please forgive
> my ignorance in XML.
>
> Thank you,
>
> Steve
>
>

Zamdrist

2006-10-24, 6:49 pm

Monica wrote:
> This is not supported by bulkload.
> "You specify the mapping schema for XML Bulk Load external to the XML data.
> You cannot specify the mapping schema at a node by using the xmlns="x:schema"
> attribute."
>
> I hope this helps.
>
> Best regards,
> --
> Monica Frintu


Thank you Monica.

There appear to be other options, however none of them seem to be as
easy as SQLXMLBulkLoad. Would you have any suggestions?

Ideally I would be able to read right from the HTTP stream, and import
into SQL Server. I see that MS Access 2003 does this handily, however
if I can I'd like to go straight into SQL Server.

Thanks

Zamdrist

2006-10-24, 6:49 pm

Monica wrote:
> This is not supported by bulkload.
> "You specify the mapping schema for XML Bulk Load external to the XML data.
> You cannot specify the mapping schema at a node by using the xmlns="x:schema"
> attribute."
>
> I hope this helps.
>
> Best regards,
> --
> Monica Frintu


Thank you Monica.

There appear to be other options, however none of them seem to be as
easy as SQLXMLBulkLoad. Would you have any suggestions?

Ideally I would be able to read right from the HTTP stream, and import
into SQL Server. I see that MS Access 2003 does this handily, however
if I can I'd like to go straight into SQL Server.

Thanks

Monica Frintu [MSFT]

2006-10-24, 6:49 pm

You cannot do bulkload into SQL Server if you don't have a schema file
(external to the data file).
You can use the XSD inference tool to infer the schema for the xml data but
you'd still need to add the sqlxml annotations.

Regards,
--
Monica Frintu


"Zamdrist" wrote:

> Monica wrote:
>
> Thank you Monica.
>
> There appear to be other options, however none of them seem to be as
> easy as SQLXMLBulkLoad. Would you have any suggestions?
>
> Ideally I would be able to read right from the HTTP stream, and import
> into SQL Server. I see that MS Access 2003 does this handily, however
> if I can I'd like to go straight into SQL Server.
>
> Thanks
>
>

Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com