Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
DB Engine
SQL ServerMSDESQL Server CE
Services
Analysis (Data Mining)Analysis (OLAP)DTSIntegration ServicesNotification ServicesReporting Services
Programming
CLRConnectivitySQLXML
Other Technologies
ClusteringEnglish QueryFull-Text SearchReplicationService Broker
General
Data WarehousingPerformanceSecuritySetupSQL Server ToolsOther SQL Server Topics
DirectoryUser Groups
Related Topics
MS AccessOther DB ProductsMS Server Products.NET DevelopmentVB DevelopmentJava DevelopmentMore Topics ...

SQL Server Forum / General / Other SQL Server Topics / March 2008

Tip: Looking for answers? Try searching our database.

Namespace problem in Bulkload

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
worlman385@yahoo.com - 30 Mar 2008 09:50 GMT
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)

)
Mike C# - 30 Mar 2008 18:22 GMT
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">

>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
[quoted text clipped - 64 lines]
>
> )
worlman385@yahoo.com - 30 Mar 2008 23:36 GMT
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">

>Does this change work?
>
[quoted text clipped - 71 lines]
>>
>> )
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.