Afficher un message
Vieux 30/03/2008, 11h45   #1
worlman385@yahoo.com
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut 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&apos;s</name>
<affiliate>Music</affiliate>
</station>
<station id='19328'>
<callSign>80S</callSign>
<name>Music Choice: 80&apos;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)

)
  Réponse avec citation
 
Page generated in 0,05846 seconds with 9 queries