Re: XSD and BulkInsert



This is an example of the message:
<Message>
<Vehicle>
<PLATE1>33EDJ78</PLATE1>
<PLATE2> </PLATE2>
...


Example of XSD:
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema";
xmlns:sql="urn:schemas-microsoft-com:mapping-schema">
<xs:element name="Vehicle" sql:relation="TmpVehicle">
<xs:complexType>
<xs:sequence>
<xs:element name="PLATE1" sql:field="StrEnginePlate">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="20"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="PLATE2" minOccurs="0" sql:field="StrTrailerPlate">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="20"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
....


Thanks a lot!!!

"Rubén Garrigós" wrote:

Hmm maybe the problem is related with the xsi:nil property or the schema
used. Can you send an example of the XML file?

"Tatopitta" <Tatopitta@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:D940BCC0-D262-4CFD-BF20-4E170F015F06@xxxxxxxxxxxxxxxx
I hope this is not out of topic. If yes, sorry and tell me the correct
group.
We're using BulkInsert to load xml files in a SQLExpress DB.
In one XML field we may have whitespace" " but when the file is loaded, in
the DB we have null value for this field: we want to have emptyspace also
in
the DB. Do you know if there are settings or parameters to solve this
problem?

Thanks a lot!

--

Rubén Garrigós
Solid Quality Mentors


.



Relevant Pages

  • Re: XMLDesigner XSD DataSet Order with Relationships
    ... I don't suppose you could post your xsd schema? ... it looked like this in .Net's XMLDesigner: ... the Dataset.WriteXML command to produce the XML file. ... XMLDesigner puts the related tag at the bottom of the BankItem ...
    (microsoft.public.dotnet.xml)
  • Re: xsd.exe cannot generate schema
    ... xsd.exe cannot generate a schema from such an xml file. ... For example, write the XSD like ...
    (microsoft.public.dotnet.xml)
  • Re: How is this done?
    ... Why not have them open the XML file and then the program opens the XSD file ... I would like the XML and XSD to be a SINGLE file. ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Writing an XMl file using a specified schema
    ... This is the xsd: ... the relation objects create the parent child relationship between the ... the columnmapping stuff is pretty self explanatory. ... data to a xml file, I want to map the XSD file I created to the dataset so ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: xsd.exe cannot generate schema
    ... thought it should be dealt with by default by any schema inferencing tool ... The reason I ask is that BizTalk makes a lot of use of xsd schemas. ... xsd.exe cannot generate a schema from such an xml file. ... >> The xml file has a mix of defined namespaces and also an empty namespace. ...
    (microsoft.public.dotnet.xml)

Loading