How can I create an XSD document based on an XML file content?

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



0
6/4/2007 11:28:02 PM
dotnet.xml 7266 articles. 0 followers. Follow

13 Replies
656 Views

Similar Articles

[PageSpeed] 15

I've used this XSD generator and like the output:
http://www.xmlforasp.net/codebank/system_data/XsdSchemaGenerator.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" <billn_nospam_please@jaco.com> wrote in message 
news:%23qGc$$vpHHA.1244@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
>
>
> 


0
starfire (7)
6/4/2007 11:55:53 PM
Bill Nguyen wrote:
> Is it possible to create your won XSD to use with .NET based on an XML 
> content?

The .NET framework SDK has a tool named xsd.exe which can do that.

And the .NET framework (2.0 and later) has a class XmlSchemaInference 
which has a method InferSchema:
<http://msdn2.microsoft.com/en-us/library/system.xml.schema.xmlschemainference.aspx>




-- 

	Martin Honnen --- MVP XML
	http://JavaScript.FAQTs.com/
0
mahotrash (1777)
6/5/2007 11:09:33 AM
Jerry;
I don't know how you did it, but I got Invalid XML file message when trying 
to generate an XSD!

Bill

"Jerry N" <starfire@newsgroup.nospam> wrote in message 
news:%23z2vsPwpHHA.196@TK2MSFTNGP05.phx.gbl...
> I've used this XSD generator and like the output:
> http://www.xmlforasp.net/codebank/system_data/XsdSchemaGenerator.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" <billn_nospam_please@jaco.com> wrote in message 
> news:%23qGc$$vpHHA.1244@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
>>
>>
>>
>
> 


0
6/5/2007 4:44:09 PM
Jerry;
I got an error message regarding 'pcats' namespace is undeclared. It seems 
to me that 'pcats' was removed from the xsd file you generated!

Thanks

Bill
"Jerry N" <starfire@newsgroup.nospam> wrote in message 
news:%23z2vsPwpHHA.196@TK2MSFTNGP05.phx.gbl...
> I've used this XSD generator and like the output:
> http://www.xmlforasp.net/codebank/system_data/XsdSchemaGenerator.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" <billn_nospam_please@jaco.com> wrote in message 
> news:%23qGc$$vpHHA.1244@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
>>
>>
>>
>
> 


0
6/5/2007 4:53:35 PM
Martin;
I used the same XML file and got the same error:

'pcats' is an undeclare namespace. Line 2, position 2.
'pcats' is all over in the XML file.

What Am I missing here?

Thanks

Private Sub SchemaReference()

Dim dPath = "\\nasserver\archive$\FTP\DTN\DTN_PCATS\"

Dim reader As XmlReader = XmlReader.Create(dPath & "testnaxml.xml")

Dim schemaSet As XmlSchemaSet = New XmlSchemaSet()

Dim schema As XmlSchemaInference = New XmlSchemaInference()

schemaSet = schema.InferSchema(reader)

For Each s As XmlSchema In schemaSet.Schemas()

s.Write(Console.Out)

Next



End Sub

--- TESTNAXML.XML --------

<?xml version="1.0"?>
<pcats:NAXML-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:NAXML-FuelsDoc>




"Martin Honnen" <mahotrash@yahoo.de> wrote in message 
news:uC50AI2pHHA.596@TK2MSFTNGP06.phx.gbl...
> Bill Nguyen wrote:
>> Is it possible to create your won XSD to use with .NET based on an XML 
>> content?
>
> The .NET framework SDK has a tool named xsd.exe which can do that.
>
> And the .NET framework (2.0 and later) has a class XmlSchemaInference 
> which has a method InferSchema:
> <http://msdn2.microsoft.com/en-us/library/system.xml.schema.xmlschemainference.aspx>
>
>
>
>
> -- 
>
> Martin Honnen --- MVP XML
> http://JavaScript.FAQTs.com/ 


0
6/5/2007 5:09:43 PM
Bill Nguyen wrote:

> I used the same XML file and got the same error:
> 
> 'pcats' is an undeclare namespace. Line 2, position 2.
> 'pcats' is all over in the XML file.

So your XML sample is not well-formed:

 > <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">

it needs a namespace declaration for the prefix pcats e.g.

 > <pcats:FuelsDoc
 > xmlns="http://www.naxml.org/Retail-EDI/Vocabulary/2003-10-16"
 > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xmlns:pcats="http://example.com/ns1"
 > xsi:schemaLocation="NAXML-FuelPrice15.xsd">

-- 

	Martin Honnen --- MVP XML
	http://JavaScript.FAQTs.com/
0
mahotrash (1777)
6/5/2007 5:17:36 PM
Yes, I removed the 'pcats' prefix to get it to work.  I forgot to include it 
in my original reply.  When you add the namespace declaration, I hope this 
web page works better.

Jerry

"Bill Nguyen" <billn_nospam_please@jaco.com> wrote in message 
news:eNtCQI5pHHA.208@TK2MSFTNGP05.phx.gbl...
> Jerry;
> I got an error message regarding 'pcats' namespace is undeclared. It seems 
> to me that 'pcats' was removed from the xsd file you generated!
>
> Thanks
>
> Bill
> "Jerry N" <starfire@newsgroup.nospam> wrote in message 
> news:%23z2vsPwpHHA.196@TK2MSFTNGP05.phx.gbl...
>> I've used this XSD generator and like the output:
>> http://www.xmlforasp.net/codebank/system_data/XsdSchemaGenerator.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" <billn_nospam_please@jaco.com> wrote in message 
>> news:%23qGc$$vpHHA.1244@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
>>>
>>>
>>>
>>
>>
>
> 


0
starfire (7)
6/5/2007 5:39:25 PM
Jerry;
Where do I need to add the 'pcats' namespace declaration?
THanks
Bill
"Jerry N" <starfire@newsgroup.nospam> wrote in message 
news:uXOGbo5pHHA.1220@TK2MSFTNGP03.phx.gbl...
> Yes, I removed the 'pcats' prefix to get it to work.  I forgot to include 
> it in my original reply.  When you add the namespace declaration, I hope 
> this web page works better.
>
> Jerry
>
> "Bill Nguyen" <billn_nospam_please@jaco.com> wrote in message 
> news:eNtCQI5pHHA.208@TK2MSFTNGP05.phx.gbl...
>> Jerry;
>> I got an error message regarding 'pcats' namespace is undeclared. It 
>> seems to me that 'pcats' was removed from the xsd file you generated!
>>
>> Thanks
>>
>> Bill
>> "Jerry N" <starfire@newsgroup.nospam> wrote in message 
>> news:%23z2vsPwpHHA.196@TK2MSFTNGP05.phx.gbl...
>>> I've used this XSD generator and like the output:
>>> http://www.xmlforasp.net/codebank/system_data/XsdSchemaGenerator.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" <billn_nospam_please@jaco.com> wrote in message 
>>> news:%23qGc$$vpHHA.1244@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
>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
> 


0
6/5/2007 6:11:11 PM
Martin Honnen had an example buried in his message.  I added it to the 
FuelsDoc declarations as shown below.  I also tested it on the web page 
(http://www.xmlforasp.net/codebank/system_data/XsdSchemaGenerator.aspx).

<?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"
xmlns:pcats="http://example.com/ns1"
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>


"Bill Nguyen" <billn_nospam_please@jaco.com> wrote in message 
news:u1d4mz5pHHA.196@TK2MSFTNGP05.phx.gbl...
> Jerry;
> Where do I need to add the 'pcats' namespace declaration?
> THanks
> Bill
> "Jerry N" <starfire@newsgroup.nospam> wrote in message 
> news:uXOGbo5pHHA.1220@TK2MSFTNGP03.phx.gbl...
>> Yes, I removed the 'pcats' prefix to get it to work.  I forgot to include 
>> it in my original reply.  When you add the namespace declaration, I hope 
>> this web page works better.
>>
>> Jerry
>>
>> "Bill Nguyen" <billn_nospam_please@jaco.com> wrote in message 
>> news:eNtCQI5pHHA.208@TK2MSFTNGP05.phx.gbl...
>>> Jerry;
>>> I got an error message regarding 'pcats' namespace is undeclared. It 
>>> seems to me that 'pcats' was removed from the xsd file you generated!
>>>
>>> Thanks
>>>
>>> Bill
>>> "Jerry N" <starfire@newsgroup.nospam> wrote in message 
>>> news:%23z2vsPwpHHA.196@TK2MSFTNGP05.phx.gbl...
>>>> I've used this XSD generator and like the output:
>>>> http://www.xmlforasp.net/codebank/system_data/XsdSchemaGenerator.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" <billn_nospam_please@jaco.com> wrote in message 
>>>> news:%23qGc$$vpHHA.1244@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
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
> 


0
starfire (7)
6/5/2007 6:26:52 PM
Jerry;
You're correct.
I played with the new xsd and it seemed to work , but only for the 1st table 
<transmissionHeader> in the dataset.
When I tried to read the <fuelPriceInfo> record, I got error since 
<terminal> and <fuelproduct> are nested.
Can you please help with the .readxml syntax for nested items?

Thanks

Bill

"Jerry N" <starfire@newsgroup.nospam> wrote in message 
news:u9Kmf85pHHA.4772@TK2MSFTNGP05.phx.gbl...
> Martin Honnen had an example buried in his message.  I added it to the 
> FuelsDoc declarations as shown below.  I also tested it on the web page 
> (http://www.xmlforasp.net/codebank/system_data/XsdSchemaGenerator.aspx).
>
> <?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"
> xmlns:pcats="http://example.com/ns1"
> 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>
>
>
> "Bill Nguyen" <billn_nospam_please@jaco.com> wrote in message 
> news:u1d4mz5pHHA.196@TK2MSFTNGP05.phx.gbl...
>> Jerry;
>> Where do I need to add the 'pcats' namespace declaration?
>> THanks
>> Bill
>> "Jerry N" <starfire@newsgroup.nospam> wrote in message 
>> news:uXOGbo5pHHA.1220@TK2MSFTNGP03.phx.gbl...
>>> Yes, I removed the 'pcats' prefix to get it to work.  I forgot to 
>>> include it in my original reply.  When you add the namespace 
>>> declaration, I hope this web page works better.
>>>
>>> Jerry
>>>
>>> "Bill Nguyen" <billn_nospam_please@jaco.com> wrote in message 
>>> news:eNtCQI5pHHA.208@TK2MSFTNGP05.phx.gbl...
>>>> Jerry;
>>>> I got an error message regarding 'pcats' namespace is undeclared. It 
>>>> seems to me that 'pcats' was removed from the xsd file you generated!
>>>>
>>>> Thanks
>>>>
>>>> Bill
>>>> "Jerry N" <starfire@newsgroup.nospam> wrote in message 
>>>> news:%23z2vsPwpHHA.196@TK2MSFTNGP05.phx.gbl...
>>>>> I've used this XSD generator and like the output:
>>>>> http://www.xmlforasp.net/codebank/system_data/XsdSchemaGenerator.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" <billn_nospam_please@jaco.com> wrote in message 
>>>>> news:%23qGc$$vpHHA.1244@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
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
> 

0
6/6/2007 2:41:24 PM
I loaded the generated schema into VS.NET 2005 and it displayed good 
diagram.  It looks like you're trying to take the next step and load 
relational tables into a dataset from an XML file.  I would take a look at 
"Typed DataSets" and create a separate typed dataset so you can examine the 
code that gets generated.  You'll need to find out how to create the 
ForeignKeyConstraints, etc.

I would also recommend a book "Pragmatic ADO.NET" by Shawn Wildermuth since 
it has several chapters on DataSets, Typed DataSets, etc.

Jerry

"Bill Nguyen" <billn_nospam@jaco.com> wrote in message 
news:2648B1C3-2722-4A49-A43C-154A6AE284CD@microsoft.com...
> Jerry;
> You're correct.
> I played with the new xsd and it seemed to work , but only for the 1st 
> table <transmissionHeader> in the dataset.
> When I tried to read the <fuelPriceInfo> record, I got error since 
> <terminal> and <fuelproduct> are nested.
> Can you please help with the .readxml syntax for nested items?
>
> Thanks
>
> Bill
>
> "Jerry N" <starfire@newsgroup.nospam> wrote in message 
> news:u9Kmf85pHHA.4772@TK2MSFTNGP05.phx.gbl...
>> Martin Honnen had an example buried in his message.  I added it to the 
>> FuelsDoc declarations as shown below.  I also tested it on the web page 
>> (http://www.xmlforasp.net/codebank/system_data/XsdSchemaGenerator.aspx).
>>
>> <?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"
>> xmlns:pcats="http://example.com/ns1"
>> 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>
>>
>>
>> "Bill Nguyen" <billn_nospam_please@jaco.com> wrote in message 
>> news:u1d4mz5pHHA.196@TK2MSFTNGP05.phx.gbl...
>>> Jerry;
>>> Where do I need to add the 'pcats' namespace declaration?
>>> THanks
>>> Bill
>>> "Jerry N" <starfire@newsgroup.nospam> wrote in message 
>>> news:uXOGbo5pHHA.1220@TK2MSFTNGP03.phx.gbl...
>>>> Yes, I removed the 'pcats' prefix to get it to work.  I forgot to 
>>>> include it in my original reply.  When you add the namespace 
>>>> declaration, I hope this web page works better.
>>>>
>>>> Jerry
>>>>
>>>> "Bill Nguyen" <billn_nospam_please@jaco.com> wrote in message 
>>>> news:eNtCQI5pHHA.208@TK2MSFTNGP05.phx.gbl...
>>>>> Jerry;
>>>>> I got an error message regarding 'pcats' namespace is undeclared. It 
>>>>> seems to me that 'pcats' was removed from the xsd file you generated!
>>>>>
>>>>> Thanks
>>>>>
>>>>> Bill
>>>>> "Jerry N" <starfire@newsgroup.nospam> wrote in message 
>>>>> news:%23z2vsPwpHHA.196@TK2MSFTNGP05.phx.gbl...
>>>>>> I've used this XSD generator and like the output:
>>>>>> http://www.xmlforasp.net/codebank/system_data/XsdSchemaGenerator.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" <billn_nospam_please@jaco.com> wrote in message 
>>>>>> news:%23qGc$$vpHHA.1244@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
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
> 


0
starfire (7)
6/6/2007 3:47:00 PM
You can also load your xml file into VS2005 and click "Create Schema" button 
(or access it from the XML menu).
When you load the file into VS, it will also list all the errors you have in 
it.

-- 
Stan Kitsis
Program Manager, XML Technologies
Microsoft Corporation

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
"Bill Nguyen" <billn_nospam_please@jaco.com> wrote in message 
news:%23qGc$$vpHHA.1244@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
>
>
> 


0
skits (68)
6/7/2007 6:30:33 PM
Hello! Good Site! Thanks you! cxdgkijybd
0
edujygzkmf
6/21/2007 11:08:21 PM
Reply:

Similar Artilces:

Lookup based on criteria in 2 columns
Hi, I am trying to use a vlookup or other function to return the value in the amount column based on the location and date. Here is a sample of my data: Location Date Amount 101 9/15/8 10 101 9/16/8 20 101 9/17/8 15 102 9/15/8 50 102 9/16/8 75 102 9/17/8 67 For example if I wanted to return the amount for location 102 on 9/15/8, what formula would I use? I tried using variations of vlookups but had no luck. Thanks, =SUMPRODUCT(--(A2:A50=102),--(B2:B50=DATE(2008,9,15)),C2:C50) -- Regards, Peo Sjo...

MS Money 95 data files
I hope that some one can answer this for me. I have used MS Money 95 for years, and it works just fine for me on Windows XP, however, I now have to reformat my hard drive, and have discovered that I can nolonger find my original install disk. Will the latest versions of Money still read the MS Money 95 data files. All that I have ever used the program for is to track my investments, and am unlikely to do any different in the future. Thanks Stan B In microsoft.public.money, Stan Banner wrote: >I hope that some one can answer this for me. >I have used MS Money 95 for years, and...

Exchange 2003 new install can not receive external email.
I have just setup a new Windows Server 2003 standard edition with Exchange 2003 standard edition on it. I have been working for a while trying to get it to receive external email. I can send out and send/ receive internal messages, but when someone trys to send me a message from outside our network they get the following returned mail message This Message was undeliverable due to the following reason: Each of the following recipients was rejected by a remote mail server. The reasons given by the server are included to help you determine why each recipient was rejected. Recipient: <**...

move cell contents
Is there a way to move a cell contents to another cell with a formula. ex: if a5="Name" then move g5 to j5? Also, I am using =INDEX(Sheet1!B3:B12,INT((RAND()*10)+1),1) to pick random names from a list. I have the formula in different place pick random names from different list. This does work, but I have different list with some of the same names and with the random pick I do not want the same name to appear. -- Thanks for any and all help. Davidl Hi David a formula can only affect the cell it is in, it can't move or change another cell for this you need some code ...

Create a distribution list from addresses in the 'To' list
Hi all, I belong to a social group, and our co-ordinator sends out an email from time to time with all the latest addresses in the To list. I already have a distribution list for the group, which then needs to be checked through and updated. Is there a simple way of transferring those addresses into my own distribution list? I'm using Outlook 2002. Everybody's fiddling around with bits of paper - I'll be a hero if I can make it easy for them! Thanks. Astley http://www.outlook-tips.net/archives/2004/20041105.htm -- Russ Valentine [MVP-Outlook] "Astley" <ast@...

Can I send a recurring e-mail automatically each week
I want to send a e-mail with the same verbiage to the same person once a week and make it a recurrence with no end date. Can I set this up once in Outlook so it is scheduled automatically? -- Microsoft Office 2003 Version Students and Teachers Edition Windows Vista Home Premium Thank-you Happy new Year!! Carl R ...

make subreport2 visible based on condition
Help, I am running Access 2003 and have trouble getting this work right. I have an unbound subreport that contains 3 additional subreports. I want only one of the 3 to be visible based on the value in a combo box on a selection form. I can't seem to get the reference right and have tried several variations. If Forms!frmWeeklyGLrpt!cboCC = 1 Then Me!subrptGLWeekly.Report!subrptGLWeeklyCMRDA.Visible = True Me!subrptGLWeekly.Report!subrptGLWeeklyCMRDB.Visible = False Me!subrptGLWeekly.Report!subrptGLWeeklyCMRDC.Visible = False End If If Forms!frmWeeklyGL...

How can I change 'Normal' Style for Word e-mails to 'Normal (Web)'?
Hi, I'm using Word as my e-mail editor in Outlook 2003 and want to change the default Style for e-mails from 'Normal' to 'Normal (Web)'. The problem is that new e-mails and replies in HTML format use the 'Normal' Microsoft Word 'Style', and this has no gap after paragraphs. The upshot of this is that when sending an e-mail, I have to press return twice to create a gap, but when the recipient views this, their software shows it as four gaps (the extra carriage return I typed + their correctly viewed HTML carriage return after each line). E.g. I type this: ...

Drag and Drop file/directory names on Tree Control.
hi, I am writing an application in which i have one Tree control. Now i want that , when user drag & drop any file/folder on tree control the file name/folder name should be add in the tree control item. User may drag and drop file from desktop or may be from directory. I just want the path of that file/foder name nothing else. so plz tell me will it be possible ... Plz Help me............. Klic..... > I am writing an application in which i have one Tree control. >Now i want that , when user drag & drop any file/folder on tree >control the file nam...

formula based on format
Is there a way to have a formula that is based on a cell colour or based on the way a cell is formated? I need it to count the number of occurrences that this happens. -- Thank you for your time. Windows NT Office 97 Hi you'll need VBA. See for an example: http://cpearson.com/excel/colors.htm "James Kendall" wrote: > Is there a way to have a formula that is based on a cell colour or based on > the way a cell is formated? I need it to count the number of occurrences > that this happens. > -- > Thank you for your time. > Windows NT > Office 97 This ...

adding name /creating field/query?
Hello, I can create an invoice_number field in a query using the primary field ID from the main table as invoice_number: ID but if ID say is 100, I cannot work out how to create renewal_invoice_100 Cheers Geoff Geoff We aren't there. We can't see what you're looking at. Where did "renewal_invoice_100" come from and what does it mean? Please post the SQL statement of the query you are trying to use. -- Regards Jeff Boyce www.InformationFutures.net Microsoft Office/Access MVP http://mvp.support.microsoft.com/ Microsoft IT Academy Program Mentor http://micro...

Creating new attributes
When using Schema Manager to create new attributes, I'm not able to create a new attribute with "Lookup" as type, "Lookup" is not availabe as one of the type options. But yet some of the exist fields, for example, in Account table came with "Lookup" as type. Why? Is there a work-around? Please help. Thanks. You cannot add custom lookup's to the current release of MSCRM. The only way around is to build a custom .aspx page and build your own. Might be possible in the next release. "HEC" wrote: > When using Schema Manager to crea...

cant start outlook pst file to large
Hi I hope somebody may be able to help im new to outlook and now I cant start outlook message says cannot open your default email folders pst file its too large as I cannot open outlook I cannot delete old folders See if this helps: http://support.microsoft.com/kb/296088 -- -Ben- Ben M. Schorr, MVP Roland Schorr & Tower http://www.rolandschorr.com http://www.officeforlawyers.com/outlook.html Author: The Lawyer's Guide to Microsoft Outlook 2007: http://tinyurl.com/ol4law-amazon "Ray" <Ray@discussions.microsoft.com> wrote in message news:B3B824DC-3C9B-4B1B-8EF3-61...

Where is the workspace file stored?
I was given a project folder containing several dozen files. So where is the workspace file normally located? If I don't have a workspace file how can I cerate one? Using VC version 6. TIA I haven't used VC6 for some time, but if I remember right you can just open the .dsp file and it will create a .dsw file for you. It typically goes in the same folder with the code. Tom "Phisherman" <noone@nobody.com> wrote in message news:be93539ccf8a6f25ibh4vt6ggmtbi024mq@4ax.com... >I was given a project folder containing several dozen files. So where > is the wor...

How do I create several NEW templates from start to finish please?
Hi knowledgeable people. I am looking for instructions on how to create a range of basic templates that I can use, perhaps even by selecting them as 'stationery', for example; if I go to >New >Format >Apply stationery, or any other similar method. I can create new html stationery backgrounds, but this is NOT what I am looking for, as a lot of people still read email in plain text only...does this make sense? Plain text templates would be fine. I simply can't find any info on creating email templates anywhere to suit this Windows Live Mail Desktop versio...

can't customize toolbar
Version: 2008 Operating System: Mac OS X 10.5 (Leopard) Processor: Intel all i see is document elements, quick tables, charts and smartart graphics. i do not see the main menu or the toolbar button. when i attempt to customize the toolbar, the to menu bar and format bar do not appear where they should. on a website i visited, they advised that i drag and drop the temporary toolbar into the real toolbar. but i can't drag and drop the toolbar. i can only move the temporary toolbar. how do i add the menu bar and format bar for go? You may have hidden the toolbar by accident. Click on the ti...

Change File Locations to Private Drive (not Folder)
Hi, I know that I can use "File Locations" in "Options" so that whenever I use the "Open..." command in Word, it will open to a specific folder. I'm wondering if there is a way that this can be applied not to a folder but to a specific drive on a network. Our company has a main public drive and has also assigned each of the Staff their own private drive. Is there a way to access the "main page" (for lack of a better term) of my private drive each time I use "Open..." in Word? Right now it goes to "My Computer" or ...

Unexpected error message on closing an Excel file
Suddenly I am getting the following message when I try to close a workbook: "Your formula contains an invalid external reference to a worksheet. Verify that the path, workbook, and range name or cell reference are correct, and try again" The mysterious thing is that it does not happen consistently and that, after I click OK after the above message, I can still save the file. What might be the cause of this error message and can the "invalid reference" be tracked down using one of the utility add-ins such as J. Walkenbach's PUP? If it only happens when you close ...

Invalid XML error when I open customization setting
I have a problem when I try to open customization setting after I import an entity. The system errored "Invalid XML" "The XML passed to the platform is not well-formed XML". Please recommend how to resolve this problem. Thanks. ...

Reverse created rules
I inadvertantly created a rule to automatically send emails from an email address directly into the deleted files. How do I reverse or delete the rule for this sender??????? If this is Outlook then select the Tools Menu > Rules Wizard > locate the Rule and delete it, if its Outlook Express then go to Tools > Message Rules "joebzii@everestkc.net" <anonymous@discussions.microsoft.com> wrote in message news:1c12401c4218b$fa8e7f70$a401280a@phx.gbl... > I inadvertantly created a rule to automatically send > emails from an email address directly into the deleted &...

[b]Can I download Excel data to a MS Access database?[/b]
I've built an Excel 2002 form that I want our internal customers to access from our intranet, and use. Once completed, they will send it to us as an e-mail attachment. I'd like to be able to open it, and somehow download the data from the form into an MS Access 2002 database I've built (so that we don't have to rekey it into the database). Is this possible or even feasible? Any and all help is appreciated. Thanks. :D --------- Message sent via www.excelforums.com Hi in Access check 'File - Import External data' -- Regards Frank Kabel Frankfurt, Germany "...

Converting XML > Dataset
Hi ! Here's my problem in english :-) I want to convert the mssecure.xml file from Microsoft into an dataset to store it in an SQL-Database. My code in VB looks like this : Dim ds As New DataSet Dim doc As New Xml.XmlDocument doc.Load("D:\mssecure.xml") Dim sReader As New StringReader(doc.InnerXml) ds.ReadXml(sReader) The problem is : At the ds.readxml(sreader) command i get an error which told me, that there is an problem whith a relationship in "ProductFamilies" I hope my english is good enough to explain... Please help ! Thanks !!! Christoph Duesmann C...

why are links to websites (inserted in publisher documents) disab.
why are links to websites and e-mailadresses (inserted in publisher documents) still working in emailpreview but disabled in webpage preview? ...

Can you only merge up to a certain number of cells
I am working on microsoft excel 2003, I have a sheet that I merged cells starting with line 8 through 43...when I type my information in the merged area I can see all that I am typing...say it goes up to line 30 once I hit the enter key I can only see up to line 20. Even when I print it out it only prints up to line 20...I have checked to make sure there are not locked cells etc. I cannot figure out at all why this is happening...is there only up to a certain number of cells you can merge? From "Excel Specifications and Limits" Length of cell contents (text) ...

opening .bak file
Hi, I hope someone can help! I recently was performing a compacting operation on my outlook express folders. My computer shutdown due to a power failure and I lost some emails from a few of my folders. I was however able to get the .bak files (of the .dbx files that were lost) out of the recycle bin. If I could open one of these .bak files or convert it back to the .dbx file from which it was created I would retrieve these emails. Can anyone instruct me as to open this .bak file? Thanks for any help! Arnie K. How did you get the bak files out of the Recycle Bin? All e...