Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Hi there,

 

I have the following XML-file of a supplier. Does anyone know how the XML-Schema of this file looks like ? And does anyone know how to load this file into the VB.NET XML-Designer ?

 

<PNAResponse>

<Version>2.0</Version>

<TransactionHeader>

<SenderID>123456789</SenderID>

<ReceiverID>987654321</ReceiverID>

<ErrorStatus ErrorNumber="ErrorNumber_1">ErrorStatus_1</ErrorStatus>

<DocumentID>{C160DB2B-08A0-475F-BF17-ABF41576652A}</DocumentID>

<TransactionID>CI123456</TransactionID>

<TimeStamp>2001-07-19T13:36:41</TimeStamp>

</TransactionHeader>

<PriceAndAvailability SKU="123A321" Quantity="10">

<Price>117.00</Price>

</SpecialPriceFlag>

<ManufacturerPartNumber>IATA</ManufacturerPartNumber>

<ManufacturerPartNumberOccurs/>

<VendorNumber>8349</VendorNumber>

<Description>The Product you Ordered</Description>

<ReserveInventoryFlag>N</ReserveInventoryFlag>

<AvailableRebQty>0</AvailableRebQty>

<Branch ID="20" Name=�UK">

<Availability>-1</Availability>

<OnOrder>11</OnOrder>

<ETADate>2001-07-12</ETADate>

</Branch>

</PriceAndAvailability>

<PNAResponse>

 

Attached you can find the definition of the schema.

 

 

Especialy the line '<PriceAndAvailability SKU="123A321" Quantity="10">' is more difficult since there are 2 elements/attributes in a line without an ending PriceAndAvailability keword.

 

Thanks in advance.

 

Ysac

xmlelements.doc.zip

  • *Experts*
Posted

To open the file in in the VS.NET XML editor, just select File ->

Open -> File..., set the file type to "Data class files", and open the

file.

 

I found one small error in the file. You closed the

</SpecialPriceFlag> tag, but you never opened it. Just add an

opening <SpecialPriceFlag> and the value, and you should be

all set.

 

When you load the file into VS.NET and make this change, go to

the XML menu, then Create Schema. An XSD will be created to

match your file.

"Being grown up isn't half as fun as growing up

These are the best days of our lives"

-The Ataris, In This Diary

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...