Re: SQLXMLBulkLoad of text child nodes vs. attributes?

From: Chandra Kalyanaraman [MSFT] (chandrak_at_online.microsoft.com)
Date: 11/02/04


Date: Tue, 2 Nov 2004 14:14:55 -0800

Hi
You could use the XSDInference tool to get a XSD schema from xml.
http://apps.gotdotnet.com/xmltools/xsdinference/ is the link

this creates an XSD, but you need to annotate it with sqlxml specific
annotations to make it a proper sqlxml schema.

SQLXMLBulkLoad SchemaGen will be able to create tables. but it cannot create
constraints unless the sql:relationship , sql:relation and sql:key-fields
annotations are specified correctly.

you can also use a tool called cvtschema.exe that comes with SQLXML to
convert XDR to XSD

thanks
Chandra

-- 
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at 
http://www.microsoft.com/info/cpyright.htm
<weinerk@gmail.com> wrote in message 
news:1099361085.995269.309570@z14g2000cwz.googlegroups.com...
> 1) thanks for reply.
> 2) In that case would you recommend to rewrite the XML so that the text
> maps as
> 3) I was using "MS SQL XML view mapper" to automatically produce the
> schema from XML,
> so I could map and bulkload the XML into DB. Is there a better way?
> 4) does SQLXMLBulkLoad SchemaGen option work if I get the schema
> nailed?
> 5) also please elaborate about "moving to XSD" or a pointer where to
> read up on it (not just about XSD).
>
> thanks!!!!!!!!!!!!!!!!!!!!!!!!!!!!
>
>
> Irwin Dolobowsky [MSFT] wrote:
>> you can only map simple-type elements to columns.  ALso, I would
> recommend
>> moving to XSD.
>>
>> --
>> Thanks,
>> Irwin
>>
>> Irwin Dolobowsky
>> Program Manager, SqlXml
>> http://blogs.msdn.com/irwando
>>
>> This posting is provided "AS IS" with no warranties, and confers no
> rights.
>>
>>
>> "KW" <newsgroups@weinerk.mailshell.com> wrote in message
>> news:f9f22f30.0411010908.78662fc6@posting.google.com...
>> > SQLXMLBulkLoad of text child nodes vs. attributes?
>> >
>> > Given:
>> > 1) XML something like <e1 a1="aaa" a2="bbb">CDATA[[blah]]</e1>
>> > 2) using MSSQL 2K with SQLXML 3
>> > 3) using MS XML View Mapper to make the xdr to load data
>> > 4) using vbs to oXMLBulkLoad.Execute "C:\XMLData\kw.xdr",
>> > "C:\XMLData\tmp.xml"
>> >
>> > Question:
>> > XML element attributes map to SQL schema OK
>> > but how do I map the XML element child text to a field in SQL
> record?
> 


Relevant Pages

  • Re: XML Literals in VB9 - Whats wring with this?
    ... As for generating xsd scheme, .net framework does provide a tool "xsd.exe", ... it can help you generate xsd from a given sample XML document or generate ... However, since it's code logic is quite simple, the generated schema or ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Annotated schema with views?
    ... See below for the answers that I know (I am not the owner of the SQLXML ... > FOR XML PATH instead of the bulky FOR XML EXPLICIT. ... > I'm running into limitations in terms of performace with my XSD Schema ... > query elements in fragments and add children manually. ...
    (microsoft.public.sqlserver.xml)
  • Re: Simple mapping question
    ... Yeap created the XSD for the source and destination, ... The destination schema in your case should be a flat file schema. ... There isn't an XML schema ... ...
    (microsoft.public.biztalk.general)
  • RE: 2.0 dataset issues - again
    ... As for the first question on XML error, ... met is due to the XSD validation of the XML Editor... ... schemas and VS IDE's install directory will contains a copy of these schema ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: XML mapping
    ... XDR to XSD ... Generates an XML schema from an XML-Data-Reduced schema file. ... Generates common language runtime DataSet classes from an XSD schema file. ...
    (microsoft.public.de.german.entwickler.dotnet.csharp)