Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6

Thread: What is XML?

  1. #1
    New Coder
    Join Date
    Oct 2011
    Posts
    44
    Thanks
    5
    Thanked 0 Times in 0 Posts

    What is XML?

    I am wondering, what is XML?I have been searching everywhere but couldnt find a brief and correct answer.In general,why should i use it?Eg html creates content and css styles it,but what about XML?I know it is used in android apps to structure but rather that that what role does it play regarding the web?

  • #2
    Senior Coder
    Join Date
    Jul 2011
    Posts
    1,226
    Thanks
    3
    Thanked 171 Times in 171 Posts
    Quote Originally Posted by ubuntu View Post
    I am wondering, what is XML?I have been searching everywhere but couldnt find a brief and correct answer.In general,why should i use it?Eg html creates content and css styles it,but what about XML?I know it is used in android apps to structure but rather that that what role does it play regarding the web?
    You ever heard of RSS? That's xml based. XML is most often used by API's (although most use my preferred json object now) when returning information based on a query. It gives a fixed structure of data, without confusing it with stylisation, making it easier to parse and traverse.
    Useful function to retrieve difference in times
    The best PHP resource
    A good PHP FAQ
    PLEASE remember to wrap your code in [PHP] tags.
    PHP Code:
    // Replace this
    if(isset($_POST['submitButton']))
    // With this
    if(!empty($_POST))
    // Then check for values/forms. Some IE versions don't send the submit button 
    Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live.

  • #3
    Master Coder felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Posts
    6,592
    Thanks
    0
    Thanked 645 Times in 635 Posts
    XML is basically a document markup language where different tags can be defined for different uses.

    In addition to XHTML and RSS there are lots of other documents that use XML. Even Microsoft Office now uses a slightly proprietary version of XML for defining all of the documents you store with it.
    Stephen
    Learn Modern JavaScript - http://javascriptexample.net/
    Helping others to solve their computer problem at http://www.felgall.com/

    Don't forget to start your JavaScript code with "use strict"; which makes it easier to find errors in your code.

  • #4
    New to the CF scene
    Join Date
    Nov 2011
    Location
    USA
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts
    XML means extensible Markup Language which present set of rules for encode documents in a specific format that is easily readable for both human and machine. With the combination of XML and HTML, there is creating XHTML.

  • #5
    Supreme Overlord Spookster's Avatar
    Join Date
    May 2002
    Location
    Marion, IA USA
    Posts
    6,278
    Thanks
    4
    Thanked 83 Times in 82 Posts
    The primary purpose XML was designed for was to be a universal standard for intermediate data storage. So you can transform data from one source to another more easily.
    Spookster
    CodingForums Supreme Overlord
    All Hail Spookster

  • #6
    New Coder
    Join Date
    Jan 2012
    Location
    RI, USA
    Posts
    24
    Thanks
    1
    Thanked 0 Times in 0 Posts
    I think of XML as an alternative to a database like MySQL. You can use flat files instead of having to connect to a database when you load a page, which has its advantages. XML requires no installation, and you can use it in many web languages. There are even functions that will convert XML to an array. You can query XML just like in MySQL by learning XPath, allowing you to do basically whatever a database can do. It is platform-independant, and easily convertible to a database.

    It does have a few weaknesses, though. It has no APS, and will panic if you aren't careful with Unicode characters. In addition, it is much slower to load and read from than databases.
    Last edited by Alternative; 01-25-2012 at 06:28 PM.


  •  

    Posting Permissions

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