Forum Moderators: open
"It's where the web is headed", or
"It's what HTML was suppose to be", or
"It's great, cause you can create custom tags".
Okay. But does it have a day-to-day practical use in site developement or is just another way to do what HTML does. And, if so, is it a better way to go
...and if so, why?
Neophyte
And unfortunately some of these misleading statements have been floating around since the beginning, and have rarely been improved on.
Not that I profess to be an expect, but here goes....
HTML is a presentation markup language, and is not about to be replaced anytime soon.
XML is a data markup language, and can be used to "aid" HTML - but it is not a direct replace it.
XML is about describing and representing "DATA".
Of course, with that said, there are efforts under way to build new kinds of markup languages to potentially replace HTML - but this is still years away from any wide spread adoption.
Because of how flexiable and versitile XML is, it is extremely useful for defining these new markup languages - but XML by itself does not do it.
XML is about defining information, but you give that definition meaning - not the XML by itself. XML is just one of the tools used for the implementation.
XML is prevailent in Web Applications because of it's portiability and ease of use (its just text after all).
XML isn't functional by itself, another language or process is required to do anything with it, example JavaScript, PHP, C#, etc...
Even XSLT (a formatting language that happens to be written in XML) can't do anything unless you plug both the XML and XSL file into an active process. Examples again for initiating this process are JavaScript or a server-side language like PHP.
Implementing a custom HTML tag is an interesting feature introduced via a bit of XML, but that custom functionality is actually a product of the browser or server-side language that supports it - the XML is there just to "describe" the tags features or functions.
Remember, XML is just "DATA", nothing more.
So....what do you use XML for?
For describing or containing some data - or for giving definition to a process, like XSLT, SOAP/Web Services.
XML is not everything, and it's not perfect, but it does solve some very unique problems and has become the primary consideration when creating new programming languages and/or processes, or for transporting data across the internet between applications that need common ground (applications not originally designed to talk to each other).
Hope this helps.....
HTML is a presentation markup language
No it's not. The W3C have been working for years to remove the presentation from HTML and put it in CSS. Take a look at the HTML4.01 Strict dtd.
XML is a data markup language, and can be used to "aid" HTML - but it is not a direct replace it.
You're comparing apples with oranges. Perhaps you should be comparing XML with SGML (HTML being based on SGML and XHTML being based on XML).
XML is not a simple topic, but you have to start somewhere. Thank you for adding the extra specifics.
"HTML being based on SGML" is correct.
But "XHTML being based on XML" is incorrect.
XHTML is based on HTML, but written in XML.
The fact that both XML and HTML are derived from SGML is more a footnote in history than a programming consideration.
Cheers....
Thanks for your replies - they help clear the waters ... a bit.
My primary question remains, however: Is there anything really "practical" that I can do with XML which would make web site development/maintenance easier or more efficient?
You know, like: "Well, you can use XML to do 'this', instead of HTML (or in conjunction with HTML) which will make your web pages load faster or give you additional functionality".
I really looking for a *reason* to learn it, but I'm afraid I don't have time to learn something new if it doesn't offer some tangible benefit to my ability to do my job.
Thanks again for your responses and hope you two - and others - can shed some additional light on this core question.
Neophyte