No, it doesn't validate.
From Schema ...
<xs:element name="SalesOrde rAddRq" minOccurs="0" maxOccurs="unbo unded">
<xs:complexType >
<xs:sequence>
<xs:element name="SalesOrde rAdd" minOccurs="0"
maxOccurs="unbo unded">
<xs:complexType >
<xs:sequence>
<xs:element name="CustomerR ef" minOccurs="0"
maxOccurs="unbo unded">
<xs:complexType >
<xs:sequence>
<xs:element name="FullName" type="xs:string "
minOccurs="0" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="TxnDate" type="xs:string "
minOccurs="0" />
<xs:element name="BillAddre ss" minOccurs="0"
maxOccurs="unbo unded">
<xs:complexType >
<xs:sequence>
<xs:element name="Addr1" type="xs:string "
minOccurs="0" />
<xs:element name="Addr2" type="xs:string "
minOccurs="0" />
<xs:element name="City" type="xs:string "
minOccurs="0" />
<xs:element name="State" type="xs:string "
minOccurs="0" />
<xs:element name="PostalCod e"
type="xs:string " minOccurs="0" />
<xs:element name="Country" type="xs:string "
minOccurs="0" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="ShipAddre ss" minOccurs="0"
maxOccurs="unbo unded">
<xs:complexType >
<xs:sequence>
<xs:element name="Addr1" type="xs:string "
minOccurs="0" />
<xs:element name="Addr2" type="xs:string "
minOccurs="0" />
<xs:element name="City" type="xs:string "
minOccurs="0" />
<xs:element name="State" type="xs:string "
minOccurs="0" />
<xs:element name="PostalCod e"
type="xs:string " minOccurs="0" />
<xs:element name="Country" type="xs:string "
minOccurs="0" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="PONumber" type="xs:string "
minOccurs="0" />
From generated XML ...
<QBXML>
<QBXMLMsgsRq onError="stopOn Error">
<SalesOrderAddR q requestID="0">
<SalesOrderAd d>
<TxnDate>2007-03-20</TxnDate>
<PONumber>
</PONumber>
<DueDate>2006-03-27</DueDate>
<CustomerRef>
<FullName>Bentl ey Hard Drives, Inc.</FullName>
</CustomerRef>
<BillAddress>
<Addr1>P.O. BOX 3169</Addr1>
<Addr2>
</Addr2>
<City>ATLANTA </City>
<State>GA</State>
<PostalCode>303 09</PostalCode>
<Country>USA</Country>
</BillAddress>
<ShipAddress>
<Addr1>P.O. BOX 3169</Addr1>
<Addr2>
</Addr2>
<City>ATLANTA </City>
<State>GA</State>
<PostalCode>303 09</PostalCode>
<Country>USA</Country>
</ShipAddress>
In the XML, the PONumber & TxnDate precede the CustomerRef and addresses.
The CustomerRef is supposed to come first. The PONumber is supposed to
follow the addresses.
So the thing doesn't validate.
Thanks for your help!
dwilson
"John Saunders" <john.saunder s at trizetto.comwro te in message
news:eA******** ******@TK2MSFTN GP03.phx.gbl...
"Daniel Wilson" <d.******@EmbTr ak.comwrote in message
news:uW******** ******@TK2MSFTN GP03.phx.gbl...
I am trying to read data from MS SQL Server and turn it into an XML
message
to send to a remote server, as follows.
sfSchemaFileDia g.FilterIndex = 2
If sfSchemaFileDia g.ShowDialog = DialogResult.OK Then
DataSet1.WriteX ml(sfSchemaFile Diag.FileName)
End If
The resulting XML file is out of sequence. It does not match the schema
file I loaded. It always puts complex types last. When I dump the
schema
using WriteXMLSchema, the schema shows up right.
What am I doing wrong?
What do you mean that it's out of sequence? Does it validate against the
schema you loaded?
John