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>
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
> 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
[quoted text clipped - 15 lines]
> 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>
[quoted text clipped - 3 lines]
> <pcats:NetChange>.040000</pcats:NetChange>
> </pcats:FuelProduct>
> </pcats:Terminal>
> </pcats:FuelPriceInfo>
> </pcats:FuelsDoc>
>
[quoted text clipped - 152 lines]
>>>>>>
>>>>>> Bill
Jerry N - 06 Jun 2007 16:47 GMT
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
> Jerry;
> You're correct.
[quoted text clipped - 207 lines]
>>>>>>>
>>>>>>> Bill