I've used this XSD generator and like the output:
http://www.xmlforasp.net/codebank/sy...Generator.aspx
Here's the output (after I made some minor changes to make it a valid XML
message):
<?xml version="1.0" encoding="utf-16"?>
<xs:schema id="FuelsDoc"
targetNamespace="http://www.naxml.org/Retail-EDI/Vocabulary/2003-10-16"
xmlns:mstns="http://www.naxml.org/Retail-EDI/Vocabulary/2003-10-16"
xmlns="http://www.naxml.org/Retail-EDI/Vocabulary/2003-10-16"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"
attributeFormDefault="qualified" elementFormDefault="qualified">
<xs:element name="FuelsDoc" msdata:IsDataSet="true"
msdata:UseCurrentLocale="true">
<xs:complexType>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="TransmissionHeader">
<xs:complexType>
<xs:sequence>
<xs:element name="TransmissionId" type="xs:string"
minOccurs="0" />
<xs:element name="TransmissionDate" type="xs:string"
minOccurs="0" />
<xs:element name="TransmissionTime" type="xs:string"
minOccurs="0" />
<xs:element name="TransmissionStatus" type="xs:string"
minOccurs="0" />
<xs:element name="TransmissionSender" type="xs:string"
minOccurs="0" />
<xs:element name="TransmissionAgency" type="xs:string"
minOccurs="0" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="FuelPriceInfo">
<xs:complexType>
<xs:sequence>
<xs:element name="Terminal" minOccurs="0"
maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="City" type="xs:string" minOccurs="0"
/>
<xs:element name="State" type="xs:string" minOccurs="0"
/>
<xs:element name="Name" minOccurs="0"
maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="NamePrefix" type="xs:string"
minOccurs="0" msdata:Ordinal="0" />
</xs:sequence>
<xs:attribute name="identType" form="unqualified"
type="xs:string" />
<xs:attribute name="ident" form="unqualified"
type="xs:string" />
</xs:complexType>
</xs:element>
<xs:element name="FuelProduct" minOccurs="0"
maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="EffectiveDate" type="xs:string"
minOccurs="0" />
<xs:element name="EffectiveTime" type="xs:string"
minOccurs="0" />
<xs:element name="Price" type="xs:string"
minOccurs="0" />
<xs:element name="NetChange" type="xs:string"
minOccurs="0" />
<xs:element name="FuelProductId" nillable="true"
minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:simpleContent
msdata:ColumnName="FuelProductId_Text" msdata:Ordinal="1">
<xs:extension base="xs:string">
<xs:attribute name="identType"
form="unqualified" type="xs:string" />
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:schema>
"Bill Nguyen" <bi*****************@jaco.comwrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl...
Is it possible to create your won XSD to use with .NET based on an XML
content?
For example the one below:
<?xml version="1.0"?>
<pcats:FuelsDoc
xmlns="http://www.naxml.org/Retail-EDI/Vocabulary/2003-10-16"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="NAXML-FuelPrice15.xsd">
<pcats:TransmissionHeader>
<pcats:TransmissionId>200706040938</pcats:TransmissionId>
<pcats:TransmissionDate>2007-06-04</pcats:TransmissionDate>
<pcats:TransmissionTime>09:38:19-06:00</pcats:TransmissionTime>
<pcats:TransmissionStatus>original</pcats:TransmissionStatus>
<pcats:TransmissionSender>Apex Oil</pcats:TransmissionSender>
<pcats:TransmissionAgency>DTN Integrated
Services/dtnDataConnect</pcats:TransmissionAgency>
</pcats:TransmissionHeader>
<pcats:FuelPriceInfo>
<pcats:Terminal>
<pcats:Name identType="PlantNumber" ident="1070">
<pcats:NamePrefix>Frsn KMEP</pcats:NamePrefix>
</pcats:Name>
<pcats:City>Fresno</pcats:City>
<pcats:State>CA</pcats:State>
<pcats:FuelProduct><pcats:EffectiveDate>2007-06-04</pcats:EffectiveDate>
<pcats:EffectiveTime>10:00:00</pcats:EffectiveTime>
<pcats:FuelProductId identType="Ultra Low Sulfur CARB
#2">0402</pcats:FuelProductId>
<pcats:Price>2.240000</pcats:Price>
<pcats:NetChange>.040000</pcats:NetChange>
</pcats:FuelProduct>
</pcats:Terminal>
</pcats:FuelPriceInfo>
</pcats:FuelsDoc>
Thanks
Bill