ASP
  Home arrow ASP arrow Page 2 - Front End XML For ASP Developers
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
ASP

Front End XML For ASP Developers
By: Eugene Gilerson
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 3
    2002-11-18

    Table of Contents:
  • Front End XML For ASP Developers
  • Data Exchange
  • Configuration Files
  • There's a Bonus
  • Conclusion

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    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.

    More ASP Articles
    More By Eugene Gilerson


     

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







    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 5 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek