Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XML
|
XML General XML discussions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XML section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 5th, 2004, 11:12 PM
Registered User
 
Join Date: Feb 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default XML Bulk Load Help Needed


Easy response I am sure....
The following is a snippet of XML that I am developing an Annotated XSD for use with XML Bulk Load into SQL Server 2000.

I can successfully map to 4th level elements i.e. 'root/businessEntity/dgrFund/endorsedFrom' but am unable to map to 5th level elements i.e. 'root/businessEntity/dgrFund/dgrFundName/organisationName'

Ther error I currentl receive using the following files is:
Schema: unable to load schema 'Build_08.01.xsd'. An error occurred (Build_08.01.xsd#/schema[1]/element[position() = 1 and @name = 'businessEntity']/complexType[1]/sequence[1]/element[position() = 2 and @name = 'dgrFund']/complexType[1]/sequence[1]/element[position() = 1 and @name = 'dgrFundName/organisationName']
Error parsing 'dgrFundName/organisationName' as NCName datatype.
A name contained an invalid character.).

Any help much appreciated!!

Sample XML
<root>
<businessEntity>
<mainTradingName>
<organisationName>Any Old Name</organisationName>
<effectiveFrom>2000-06-14</effectiveFrom>
</mainTradingName>
<dgrFund>
<dgrFundName>
<organisationName>Some Name</organisationName>
<isCurrentIndicator>Y</isCurrentIndicator>
</dgrFundName>
<endorsedFrom>2000-07-01</endorsedFrom>
<endorsedTo>0001-01-01</endorsedTo>
</dgrFund>
</businessEntity>
</root>

Snippet of Annotated Schema

<xsd:element name="dgrFund" sql:relation="tblDGR" sql:relationship="PartyDGR">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="dgrFundName/organisationName" type="xsd:string" sql:field="DGROrganisationName"/>
<xsd:element name="endorsedFrom" type="xsd:date" sql:field="endorsedFromDate"/>
<xsd:element name="endorsedTo" type="xsd:date" sql:field="endorsedToDate"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>



 
Old February 6th, 2004, 09:06 AM
joefawcett's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
Default

You can't name an element 'dgrFundName/organisationName' as the '/' is illegal, just call it 'organisationName'. I'm away from my reference book so can't provide a full working example I'm afraid.

--

Joe





Similar Threads
Thread Thread Starter Forum Replies Last Post
Can I load this xml to a dataset? chepla C# 2005 1 August 11th, 2008 08:51 AM
Can not load XML kolucoms XML 50 May 28th, 2008 05:25 AM
load XML issue AbrarNazeer XML 5 March 13th, 2008 09:43 AM
bulk insert error - help needed!! fgeorge SQL Server 2000 2 May 25th, 2004 04:38 PM
Load Xml From String ffbalota Apache Tomcat 0 January 24th, 2004 06:28 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.