Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Beginner's question about XML

  • 17-09-2010 5:35pm
    #1
    Registered Users, Registered Users 2 Posts: 373 ✭✭


    Hi. After looking up lots of information about XML, I still don't get it. Any source I look at states that XML is a format for data. Surely XML is just a structured file that stores data and it's infact CSS that is a format for data? Could some one please explain. I'm a slow learner :)

    FYI I'm learning about XML in context of AJAX


Comments

  • Moderators, Politics Moderators Posts: 41,246 Mod ✭✭✭✭Seth Brundle


    XML is really just a series of tags defined by the user that two different applications can interpret, usually using XML's version of CSS.
    The XSLT allows formatting of the XMLs content in the same way that CSS provides formatting for HTML content.


  • Closed Accounts Posts: 410 ✭✭JohnathanM


    Hey, qwert2. Describing XML as a "structured file that stores data" is about right, and by this definition it is indeed a format. It allows us to describe information in a very flexible manner, following a few rules. A major technique to convert that data to something useful is to "transform" it through the use of stylesheets, but these are not CSS - they are in the Extensible Stylesheet Language format, or XSL.

    HTML is manipulated for rendering in a browser with stylesheets of the CSS format, which allows for formatting in defining fonts and the like. So you can think of CSS being directly related to HTML, and XML and XSL being another pairing. What makes it confusing is when it all comes together. A web page can pull data in XML format and translate it to HTML through use of XSL. Then CSS can be applied to make it look nice. Any clearer?


  • Moderators, Politics Moderators Posts: 41,246 Mod ✭✭✭✭Seth Brundle


    Have you looked through http://www.w3schools.com/xml/default.asp
    Its a simple tutorial that should bring you up a level or two


  • Registered Users, Registered Users 2 Posts: 373 ✭✭qwert2


    Thanks for the replies. Seems clearer now :)

    So XML IS a format for data. I was interpretting 'format' as font size etc, whereas in this case it means describing data with user defined tags eg: <menu></menu>

    Let me know if I'm going a stray here :) thanks


  • Moderators, Politics Moderators Posts: 41,246 Mod ✭✭✭✭Seth Brundle


    That's it!


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 2,781 ✭✭✭amen


    and it is not only used for the web.

    Many industries produce Data Interchange Standards based on XML which are used to share data between system such as the Accord standard for the auto insurance industry.


  • Closed Accounts Posts: 43 wapnote


    Before XML different companies stored/transferred data in comma delimited files, in tab delimited files, or in one a hundred other formats.

    When one company wanted to access data from another company they would generally have to get information on the format it is stored in and write a piece of code to be able to read the data. This was costly and time consuming.

    Even within a company if one application wanted to communicate with another application often it would require a lot of coding to make it possible.

    To make it easier for everyone, the XML standard for storing/transferring data was agreed. With XML you just store data in tags and sub tags. And tags can have attributes etc. XMLs tags and subtags allow data to be stored, and also the structure of the data record to be stored.

    Now if a company A wants to access company B's data it can be done using XML. Company A can request the data from B in XML and no matter how complex that data is it can be accessed easily by company A by using an XML parser.


  • Registered Users, Registered Users 2 Posts: 24 xonet


    Some history might be useful ....

    In the mid-1970s, three people at IBM (Charles Goldfarb, Ed Mosher and Ray Lorie) invented GML, a way of marking up technical documents with structural tags. The initials stood for Goldfarb, Mosher and Lorie. According to Goldfarb, he invented the term “mark-up language” in order to make better use of the initials, so it became the Standard Generalised Markup Language. The SGML specification was ratified by ISO in 1986.

    Probably the most famous application of SGML is HTML. Technically, HTML is an SGML application which defines a specific set of tags suitable for web pages. Although it took off like wildfire, HTML is where things began to go horribly wrong. The original thinking was to separate content from presentation but succeeding versions of HTML managed to totally muddy that concept.

    In the late 1990s a number of people, including Jon Bosak, Tim Bray, James Clark, developed a lightweight specification for document markup, based on SGML, which came to be known as XML. Almost immediately the W3C used that specification to reshape HTML into XHTML, an XML application.

    Technically, XML is a set of rules for encoding documents in a machine-readable format. XML is not a markup language, but a specification for defining markup languages.


Advertisement