SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Enthusiast
    Join Date
    Aug 2007
    Posts
    72
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Practical Use of XML

    Hello,

    I am looking for this on the internet since the last six hours but of no use....

    I want to know how XML is of any use.....

    I know it helps to organize data/content. I know information stored with XML helps in showing the information in any format - on a web page, or in MS-word, or in a database, etc.

    But such words/statements does not make things clears.......'for me'.........

    I want to see an example.....Could anyone help??



  2. #2
    SitePoint Mentor silver trophy
    Rubble's Avatar
    Join Date
    Dec 2005
    Location
    Cambridge, England
    Posts
    2,435
    Mentioned
    82 Post(s)
    Tagged
    3 Thread(s)
    Sitemaps for websites can be in XML format. I have a Google map which converts custom locations held in a database into flags on the map via XML.

  3. #3
    SitePoint Enthusiast
    Join Date
    Sep 2013
    Location
    UK
    Posts
    77
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by minni View Post
    But such words/statements does not make things clears.......'for me'.........
    They are more for making the data clear for machines to read, rather than 'for you', but humans should be able to understand the format too, so it can work for both. The data can be presented in a more human friendly way by software. For example KML files are XML, mapping programs like Google Earth read the data and display it in a way humans understand.

  4. #4
    SitePoint Addict
    Join Date
    Jan 2005
    Location
    Hiding from the world
    Posts
    355
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi,
    i'm pretty new to xml myself and from my very limited understanding the advantage with xml seems to be that it is a source of data that can be accessed by other people. Hopefully this is correct in my thinking...

    If you have a mysql or MSsql database no-one outside of your website can access that database directly. So if you have a list of restaurants for example you can output that from your database on a php webpage but you can't easily share it like that. If you want someone else to be able to access that information to use on their website without having to copy and paste each time you could output your data to an xml page. They can then link to that xml page and interrogate the information and use what they need. If it changes on your site it automatically updates on their site.

    I'm just learning this myself (i literally just posted a question about this today) and a good example of what xml can do is here http://findyourmp.parliament.uk/api which is the uk parliament api (example postcode to try if you aren't in the UK 'BS81ts'). By using a few variables i can return data from their xml page and use it on my site. If it changes on their site it will change on mine.

    hope that helps
    If i am a product of your imagination you should try harder!

  5. #5
    SitePoint Evangelist WebMachine's Avatar
    Join Date
    Jun 2007
    Location
    Ontario, Canada
    Posts
    420
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Thank you for that explanation, Noppy. I have avoided learning and using XML for years even though I've been told it's a very important skill to have, because I could never get my head around its purpose. You are the only person who has explained it so well that it actually makes a lot of sense.

  6. #6
    SitePoint Addict
    Join Date
    Jan 2005
    Location
    Hiding from the world
    Posts
    355
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    glad it was useful. I've probably missed a few important details but this is my understanding so far.

    this is a very good website http://www.tizag.com/xmlTutorial/ with useful easy to understand tutorials.

    good luck
    If i am a product of your imagination you should try harder!


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •