XML
  Home arrow XML arrow Page 3 - XML Basics - Part One
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 
Sun Developer Network 
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? 
XML

XML Basics - Part One
By: Liviu Tudor
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 83
    2003-12-15

    Table of Contents:
  • XML Basics - Part One
  • Brief History of Data Exchange
  • The Need for XML
  • DTD, Schema and Valid XML
  • DTD

  • 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


    XML Basics - Part One - The Need for XML


    (Page 3 of 5 )

    Just like humans, computer programs were puzzled when they “spoke” different languages – and since every single company insisted on using their own language, there was a need for common ground – neutral to all the existing ones, but which can be adapted – to serve all these languages.

    That’s where XML stepped in – through it’s (nearly) unbound structure, it allows us to describe most (if not all) data formats known in such a manner that it can be understood by other XML-enabled programs without the need for these programs to be aware of the actual contents of the file.  Even more so, XML doesn’t limit you to representing only one type of data (e.g. word processor, spreadsheets, vector graphics etc.) – you can represent anything with XML, assuming you have defined a “grammar” to do so.  Also, as there are XML parsers for nearly every single programming language, plugging XML into your application is (nearly) an easy task; and as long as the program you are exporting data for can parse XML, it should be able to understand your data.  Note the term “should” in the previous sentence!

    Let’s consider one example: suppose you write a program to export employee file details from your HR system in XML.  A typical “record” in XML could look like this:

    <Employee name=”Liviu” surname=”Tudor” birthday=”14/02/1975”/>

    This is a valid XML tag – it declares an element of type Employee, which has three attributes: name, surname and birthday. All other programs that need to read such data will look for an Employee tag and read these 3 attributes.  However, take the following one:

    <Employee>
     <Name>Liviu</Name>
     <Surname>Tudor</Surname>
     <Birthday>14/02/1975</Birthday>
    </Employee>

    It is a valid structure and it represents the same data! Even more so, try to interpret this data in the USA (the author of this article is based – at the moment – in Europe, where the data format is day/month/year) and you’ll find out that such a birth date is invalid!

    If that is the case, how would another application that needs to make use of this data “know” how to interpret it and make sure that this information is valid – and therefore no errors would be input into the system?

    More XML Articles
    More By Liviu Tudor


     

    XML ARTICLES

    - Datatypes and More in RELAX NG
    - Providing Options in RELAX NG
    - An Introduction to RELAX NG
    - Path, Predicates, and XQuery
    - Using Predicates with XQuery
    - Navigating Input Documents Using Paths
    - XML Basics
    - Introduction to XPath
    - Simple Web Syndication with RSS 2.0
    - Java UI Design with an IDE
    - UI Design with Java and XML Toolkits
    - Displaying ADO Retrieved Data with XML Islan...
    - Widget Walkthrough
    - Introduction to Widgets
    - The Why and How of XML Data Islands






    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway
    Stay green...Green IT