Home arrow ASP arrow Page 2 - Front End XML For ASP Developers
ASP

Front End XML For ASP Developers


Yahoo are using XML for their orders, are you? Should you be? In this article Eugene sheds some light on XML from an ASP developers perspective...

Author Info:
By: Eugene Gilerson
Rating: 5 stars5 stars5 stars5 stars5 stars / 36
November 18, 2002
TABLE OF CONTENTS:
  1. · Front End XML For ASP Developers
  2. · Data Exchange
  3. · Configuration Files
  4. · There's a Bonus
  5. · Conclusion

print this article
SEARCH DEVARTICLES

Front End XML For ASP Developers - Data Exchange
(Page 2 of 5 )

Today, XML is often the language (or format, in this case) of choice for most companies when it comes to exchanging data between applications. This includes batch processes, server to client feeds, custom application-level protocols and a host of other cases.

A great example of such a process is a data feed of all orders taken electronically via a web site into an internal billing and shipping system. The main advantage of XML here is it's flexibility - developers create their own tags and dictionaries, as they deem necessary. Therefore no matter what type of data is being transferred, the right XML representation of it will accurately describe the data.

Let's examine one of the most widely used formats here, a sample version of a Yahoo! Merchant "Order Download File", which is an XML representation of orders received by a Yahoo web-front store in a specified period of time.

This sample is available for download from Yahoo at
http://store.yahoo.com/lib/vw/OrderList.xml

Logically, each order can be described as one customer purchasing one or more items using their credit card and potentially entering different billing and shipping addresses. Every file will contain multiple orders, like this:

<OrderList StoreAccountName="scr-test-485.0123456789ABCDEF">
<Order id="scr-test-485">
...
</Order>
<Order id="scr-test-486">
...
</Order>
</OrderList>


The contents of the file are very easy to read, even for a person who is not familiar with XML. The information within each of the order tags is well structured and organized. This enables developers to use parsing components and easily access any data within the document. Here's a sample of how shipping information is represented:

<AddressInfo type="ship">
<Name>
<First>Sheridan</First>
<Last>Rawlins</Last>
<Full>Sheridan Rawlins</Full>
</Name>
<Address1>321 Foo bar lane</Address1>
<Address2>Apartment #2</Address2>
<City>Nowhere</City>
<State>CA</State>
<Country>US United States</Country>
<Zip>12345</Zip>
<Phone>555.444.3210</Phone>
</AddressInfo>


Each item in the order is logically a unique entity, and is also represented with a separate tag. All item properties are defined as "child" nodes of the item tag. This also helps in both reading the code and parsing the data:

<Item num="0">
<Id>auspowworran</Id>
<Code>12345</Code>
<Quantity>1</Quantity>
<Unit-Price>1000000.00</Unit-Price>
<Description>Austin Power's World Ransom</Description>
<Taxable>YES</Taxable>
<Url>http://st15.yahoo.com/scr-test/auspowworran.html</Url>
</Item>


XML is the language of choice for two major reasons. First of all, an XML formatted document can be easily processed under any OS, and in any language, as long as XML parsing components are available. On the other hand, XML files are still raw data, which enables merchants to format the data any way they want to, as opposed to, for example, Yahoo-formatted invoices for each order.

All in all, document structure and wide acceptance of this format has made it possible for Yahoo to enable customers to build more efficient internal order Tracking systems based on XML-formatted order files. Other online merchant sites are making similar functionality available on their Web sites as well.
blog comments powered by Disqus
ASP ARTICLES

- Central Scoreboard with Flash and ASP
- Calorie Counter Using WAP and ASP
- Creating PGP-Encrypted E-Mails Using ASP
- Be My Guest in ASP
- Session Replacement in ASP
- Securing ASP Data Access Credentials Using t...
- The Not So Ordinary Address Book
- Adding and Displaying Data Easily via ASP an...
- Sending Email From a Form in ASP
- Adding Member Services in ASP
- Removing Unconfirmed Members
- Trapping HTTP 500.100 - Internal Server Error
- So Many Rows, So Little Time! - Case Study
- XDO: An XML Engine Class for Classic ASP
- Credit Card Fraud Prevention Using ASP and C...

Watch our Tech Videos 
Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 
Support 

Developer Shed Affiliates

 




© 2003-2017 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials