all groups > dotnet xml > july 2006 >
You're in the

dotnet xml

group:

need help to figure out what to do with this XML


need help to figure out what to do with this XML Bill Nguyen
7/31/2006 4:15:12 PM
dotnet xml:
I ran into errors trying to open an xml file in IE with content as below.
I need to access this file using ReadXML in .NET but do not where to start.
Can you please tell me what XML files I may need to have access to (DTD, for
example)
Thanks a million!

Bill

-------------------


<?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="http://www.naxml.org/Retail-EDI/Vocabulary/2003-10-16
NAXML-FuelPrice15.xsd" version="1.5">
<pcats:TransmissionHeader>
<pcats:TransmissionId>200607311642</pcats:TransmissionId>
<pcats:TransmissionDate>2006-07-31</pcats:TransmissionDate>
<pcats:TransmissionTime>16:42:34-06:00</pcats:TransmissionTime>
<pcats:TransmissionStatus>original</pcats:TransmissionStatus>
<pcats:TransmissionSender>Valero Unbranded</pcats:TransmissionSender>
<pcats:TransmissionAgency>DTN Integrated
Services/dtnDataConnect</pcats:TransmissionAgency>
</pcats:TransmissionHeader>
<pcats:FuelPriceInfo>
<pcats:Terminal>
<pcats:Name identType="PlantNumber" ident="2026">
<pcats:NamePrefix>ElPs Valero</pcats:NamePrefix>
</pcats:Name>
<pcats:City>El Paso</pcats:City>
<pcats:State>TX</pcats:State>
<pcats:FuelProduct><pcats:EffectiveDate>2006-07-31</pcats:EffectiveDate>
<pcats:EffectiveTime>18:00:00</pcats:EffectiveTime>
<pcats:FuelProductId identType="Low Sulfur #2 Clear
Diesel">0007</pcats:FuelProductId>
<pcats:Price>2.618000</pcats:Price>
<pcats:NetChange>.016500</pcats:NetChange>
</pcats:FuelProduct>
</pcats:Terminal>
</pcats:FuelPriceInfo>
</pcats:NAXML-FuelsDoc>


Re: need help to figure out what to do with this XML nylyst NO[at]SPAM gmail.com
8/1/2006 10:51:24 AM
Bill,
I am also working on loading NAXML journals into sql 2000/2005. To
use .ReadXml() you need to Import System.Data.SqlClient and create a
new DataSet. Then just call:

DataSetName.ReadXml("c:\path\to\your\file.xml")

I did something similar trying to generate a valid schema file to allow
me to bulkload using SQLXML (much simpler and more robust/scaleable, if
I can get the schema down.) That is to say, once I executed
..ReadXml(), I loop through the dataTables in the dataset and the
columns and their properties in each table. I used a streamwriter to
ouptut this to a text file and generated the necessary SQL tables and
am finishing up the schema now.

Althought I haven't worked with the FuelsDoc spec yet, the process
should be very similar. While having the DTD and .xsd files for the
spec are handy for reference, they're poorly, if at all, documented and
do absolutely nothing to help in bulk loading your data.


HTH,
nylyst
Re: need help to figure out what to do with this XML John Saunders
8/1/2006 12:00:40 PM
[quoted text, click to view]

What happens when you try to read this?

And what is ReadXML?

John

[quoted text, click to view]

Re: need help to figure out what to do with this XML Bill Nguyen
8/1/2006 1:44:24 PM
Nylyst;

I'm glad you are working on NAXML.
I've just started working with it and don't know much about NACS standard.
I was able to read non-NAXML version of Fuelsdoc from DTN but it still
requires the DTD in the same directory with the XML files.

I'll try your suggestion and will let you know.

Thanks

Bill


[quoted text, click to view]

AddThis Social Bookmark Button