Namespace problem in Bulkload

I have namspace problem in Bulkload where if in XML data file, I have
a namespace like xmlns='urn:TMSWebServices', then in my schema I must
put xmlns:tm="urn:TMSWebServices" right?

but if I put that, then I will not able to use Bulkload as it say
tm:callSign has invalide charater.

How can I deal with namespace like xmlns='urn:TMSWebServices' in data
file?

XML schema:
Code Snippet
=============================
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:sql="urn:schemas-microsoft-com:mapping-schema"
xmlns:tm="urn:TMSWebServices">

<xsd:element name="tm:station" sql:relation="station">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="tm:callSign" type="xsd:string"/>
<xsd:element name="tm:name" type="xsd:string"/>
<xsd:element name="tm:affiliate" type="xsd:string"/>
</xsd:sequence>
<xsd:attribute name="tm:id" type="xsd:integer"/>
</xsd:complexType>
</xsd:element>

</xsd:schema>

XML data:
=============================

<xtvd xmlns='urn:TMSWebServices' >

<stations>
<station id='46719'>
<callSign>52MXI</callSign>
<name>Canal 52MX International</name>
<affiliate>Satellite</affiliate>
</station>
<station id='19327'>
<callSign>70S</callSign>
<name>Music Choice: 70's</name>
<affiliate>Music</affiliate>
</station>
<station id='19328'>
<callSign>80S</callSign>
<name>Music Choice: 80's</name>
<affiliate>Music</affiliate>
</station>
</stations>

</xtvd>

SQL Table:
=============================

CREATE TABLE ProgramListings.dbo.station)

(
id INT,
callSign VARCHAR(20),
name VARCHAR(100),
affiliate VARCHAR(100),
PRIMARY KEY(id)

)
worlman385 [ So, 30 März 2008 11:45 ] [ ID #1931570 ]

Re: Namespace problem in Bulkload

Does this change work?

<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:sql="urn:schemas-microsoft-com:mapping-schema"
xmlns:tm="urn:TMSWebServices"
xmlns="urn:TMSWebServices">

<worlman385 [at] yahoo.com> wrote in message
news:q7ouu3p1h2sc3etsgvrneu6obkdli6llp5 [at] 4ax.com...
>I have namspace problem in Bulkload where if in XML data file, I have
> a namespace like xmlns='urn:TMSWebServices', then in my schema I must
> put xmlns:tm="urn:TMSWebServices" right?
>
> but if I put that, then I will not able to use Bulkload as it say
> tm:callSign has invalide charater.
>
> How can I deal with namespace like xmlns='urn:TMSWebServices' in data
> file?
>
> XML schema:
> Code Snippet
> =============================
> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:sql="urn:schemas-microsoft-com:mapping-schema"
> xmlns:tm="urn:TMSWebServices">
>
> <xsd:element name="tm:station" sql:relation="station">
> <xsd:complexType>
> <xsd:sequence>
> <xsd:element name="tm:callSign" type="xsd:string"/>
> <xsd:element name="tm:name" type="xsd:string"/>
> <xsd:element name="tm:affiliate" type="xsd:string"/>
> </xsd:sequence>
> <xsd:attribute name="tm:id" type="xsd:integer"/>
> </xsd:complexType>
> </xsd:element>
>
> </xsd:schema>
>
> XML data:
> =============================
>
> <xtvd xmlns='urn:TMSWebServices' >
>
> <stations>
> <station id='46719'>
> <callSign>52MXI</callSign>
> <name>Canal 52MX International</name>
> <affiliate>Satellite</affiliate>
> </station>
> <station id='19327'>
> <callSign>70S</callSign>
> <name>Music Choice: 70's</name>
> <affiliate>Music</affiliate>
> </station>
> <station id='19328'>
> <callSign>80S</callSign>
> <name>Music Choice: 80's</name>
> <affiliate>Music</affiliate>
> </station>
> </stations>
>
> </xtvd>
>
> SQL Table:
> =============================
>
> CREATE TABLE ProgramListings.dbo.station)
>
> (
> id INT,
> callSign VARCHAR(20),
> name VARCHAR(100),
> affiliate VARCHAR(100),
> PRIMARY KEY(id)
>
> )
xyz [ So, 30 März 2008 19:22 ] [ ID #1932806 ]

Re: Namespace problem in Bulkload

use

<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:sql="urn:schemas-microsoft-com:mapping-schema"

xmlns:tm="urn:TMSWebServices"

targetNamespace="urn:TMSWebServices"

elementFormDefault="qualified">



On Sun, 30 Mar 2008 13:22:46 -0400, "Mike C#" <xyz [at] xyz.com> wrote:

>Does this change work?
>
><xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:sql="urn:schemas-microsoft-com:mapping-schema"
> xmlns:tm="urn:TMSWebServices"
> xmlns="urn:TMSWebServices">
>
><worlman385 [at] yahoo.com> wrote in message
>news:q7ouu3p1h2sc3etsgvrneu6obkdli6llp5 [at] 4ax.com...
>>I have namspace problem in Bulkload where if in XML data file, I have
>> a namespace like xmlns='urn:TMSWebServices', then in my schema I must
>> put xmlns:tm="urn:TMSWebServices" right?
>>
>> but if I put that, then I will not able to use Bulkload as it say
>> tm:callSign has invalide charater.
>>
>> How can I deal with namespace like xmlns='urn:TMSWebServices' in data
>> file?
>>
>> XML schema:
>> Code Snippet
>> =============================
>> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>> xmlns:sql="urn:schemas-microsoft-com:mapping-schema"
>> xmlns:tm="urn:TMSWebServices">
>>
>> <xsd:element name="tm:station" sql:relation="station">
>> <xsd:complexType>
>> <xsd:sequence>
>> <xsd:element name="tm:callSign" type="xsd:string"/>
>> <xsd:element name="tm:name" type="xsd:string"/>
>> <xsd:element name="tm:affiliate" type="xsd:string"/>
>> </xsd:sequence>
>> <xsd:attribute name="tm:id" type="xsd:integer"/>
>> </xsd:complexType>
>> </xsd:element>
>>
>> </xsd:schema>
>>
>> XML data:
>> =============================
>>
>> <xtvd xmlns='urn:TMSWebServices' >
>>
>> <stations>
>> <station id='46719'>
>> <callSign>52MXI</callSign>
>> <name>Canal 52MX International</name>
>> <affiliate>Satellite</affiliate>
>> </station>
>> <station id='19327'>
>> <callSign>70S</callSign>
>> <name>Music Choice: 70's</name>
>> <affiliate>Music</affiliate>
>> </station>
>> <station id='19328'>
>> <callSign>80S</callSign>
>> <name>Music Choice: 80's</name>
>> <affiliate>Music</affiliate>
>> </station>
>> </stations>
>>
>> </xtvd>
>>
>> SQL Table:
>> =============================
>>
>> CREATE TABLE ProgramListings.dbo.station)
>>
>> (
>> id INT,
>> callSign VARCHAR(20),
>> name VARCHAR(100),
>> affiliate VARCHAR(100),
>> PRIMARY KEY(id)
>>
>> )
>
worlman385 [ Mo, 31 März 2008 01:36 ] [ ID #1932820 ]
Datenbanken » comp.databases.ms-sqlserver » Namespace problem in Bulkload

Vorheriges Thema: Re: min_active_rowversion ( was Re: Triggers and Flag bit)
Nächstes Thema: Re: How to Interrogate SQL Server Tables for Specific Values - Here's