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)
)
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)
>
> )
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)
>>
>> )
>