Why learn XML?

Joined
Mar 1, 2012
Messages
16
Reaction score
0
Location
Johannesburg
I am just polishing my web development skills. All the skill i have learnt thus far i have been simply piloting through internet tutorials. On of the sites suggested that after learning PHP i should learn XML? So:

What is XML?
Whats its use?
Why learn XML as a web developer?

Many thanks

GoodGuyProjects.co.za
 
If you have to ask you will never understand but on a serious note, XML is there to punish developers. I hate it, and I hate it even more that not a project goes by that I still have to use XML at some point.

Learn it, understand it, and love to hate it.
 
http://en.wikipedia.org/wiki/XML

Quick google search
What is XML?
XML is a standard, simple, self-describing way of encoding both text and data so that content can be processed with relatively little human intervention and exchanged across diverse hardware, operating systems, and applications.

In brief, XML offers a widely adopted standard way of representing text and data in a format that can be processed without much human or machine intelligence. Information formated in XML can be exchanged across platforms, languages, and applications, and can be used with a wide range of development tools and utilities.

Not something u learn. Just have to understand it.
 
So as a beginner, should it be something i look at learning initially or maybe at a much later stage? Whats its use, a very basic and simple explanation. Thanks
 
XML provides a common syntax for the reliable exchange of information between applications.
 
So as a beginner, should it be something i look at learning initially or maybe at a much later stage? Whats its use, a very basic and simple explanation. Thanks
I agree with cbrunsdonza comment. XML is a must have.

XML can be used for configuration information, such as:

<xml>
<NumberOfConnections>5</NumberOfConnections>
</xml>

XML is also used for sending soap requests (which are quite common in the interweb) See: http://en.wikipedia.org/wiki/SOAP
 
Just learn what the basic components are and how to define it. XML, eXtensible Markup Language, is defined either by the application developer or third party. As a developer, if you want to persist some data (for storage or transmission), you choose the structure i.e. the elements that make up the data and the attributes of those elements, then you form a tree or hierarchy of elements to construct more complex elements. Sometimes you don't define the structure yourself, it's defined by a third party, in which case your XML must conform to a specification or schema that indicates what elements must or can be defined as well as the attributes of those elements.
 
If you want to get into Android development, you will need to use XML (in addition to either Java or C#).
 
web.config, app.config, object serialisation and deserialisation,webservices everything is based on xml.
So eventually, if you want to do serious development in an enterprise environment - you need to know xml in some way or other.
 
Since you're doing php, you'll probably at some time come across having to port some blog system to a website.... well you'll be using XML for that. At some stage you will have to write (and read) RSS feeds... you will be using XML for that too. Any sort of list containing data, is best done with XML :)
 
If you have to ask you will never understand but on a serious note, XML is there to punish developers. I hate it, and I hate it even more that not a project goes by that I still have to use XML at some point.

Learn it, understand it, and love to hate it.
I don't quite understand why it is there to punish anyone? Many file formats are implementations of XML: HTML, SVG, XAML (used for WPF applications) and even modern Office documents are archives of OpenXML files. XML is very handy in storing (and validating, when used in conjunction with an XSD or DTD schema) scalable data structures. Combining XML stored in a relational database is also very powerful. Granted, you won't find too much use in smaller applications, but it's unavoidable in enterprise-scale applications.

I love XML. My life would be incomplete without it.
 
HTML (and CSS, Javascript etc) and XML are complementary tools. XML enables you to create relational architectures of very large schematic databases independently of the appearance of the output. If you deal with smallish projects where information architecture isn't an issue then you don't really need to worry about it; but as soon as you scale up a web project to a good size it's indispensable - particularly in generating standardised documentation and managing internal content in an intuitive way.
 
Not something u learn. Just have to understand it.
Exactly. I wouldn't spent years on this, rather just know how to read, edit and use it. Not everything is just xml....
 
XML in a nutshell ...

<xml></xml>

There you go, nothing more.

---
XML has grown to be the standard in text files. This is because meta information can be stored in the text file, be readable by both human and machine, and be easy to transport / translate. As such it has become the standard on which most new text formats are built. Everything from HTML(XHTML)/SOAP/.NET/JAVA/... uses XML at some stage for some reason or the other.

I would suggest starting with just being able to create and parse an XML file: these techniques, implemented in any language, should help you throughout your career.
 
XML itself is easy to understand... this is my data and how it is organized. Done.

You probably want to learn/understand XSDs better. They define the rules and layout of your XML files. Often you will get your model classes generated from XSDs so yeah, learn that. It's not the most difficult thing to learn anyways.
 
Pretty much what everyone else has said. XML is here to stay and is used in some form or another for more and more tasks these days. Once you have a basic understanding of XML the world is your oyster. And honestly if you can understand HTML markup, XML is not such a huge intellectual leap.
 
Correct @ Octavo.

If you consideer C#, and taking WPF, XAML (based on XML) is about half of what you do on it. Take that away and you lose your advantage.
Same goes with AJAX in PHP (Async JS and XML)... remove XML and you're left with a half-ass framework incapable of doing anything.

XML is a glorious thing.
 
Top
Sign up to the MyBroadband newsletter
X