Jump to content

Explain to me why I should be using XML?


Zilee

Recommended Posts

Hey people, I'm about to finish my 3-year CS course in college, we've been taught a lot of stuff such as OOP(PHP,C++,Java,JS) I've seen a lot of things I also know how to use Oracle SQL PL/SQL. I've been more keen to web development and I've been reading the first few chapters on the XML language here at W3s. I started wondering how I could use it. I mean, I can use PHP, JS and mySQL to make my pages dynamic and get/store information at will inside tables, I don't see how XML would fit in my future web applications. I'm sure it's important, but I need some enlightenment on how I should implement the language the most effectively in web applications.I already have my hand full with technical books on other concepts/subjects so I would really appreciate if someone could just give me a quick overview on how I could use this language to make my websites more kick-###### :) !Thanks in advance

Link to comment
Share on other sites

Because XML is easily parsed, it makes an excellent multi-dimensional database format. Because an XML document is essentially one long string, transmitting it from point to point is very simple. In the context of the web, you have the ability to transmit your entire database to your client, where it can be edited dynamically, and then returned.

Link to comment
Share on other sites

XML is not a programming language like the rest of the languages you're talking about.XML is a standard text format for defining other (markup) languages. Languages like XHTML and SVG (to name just the two most popular ones) are based on XML. As the programmer, you need to parse the XML and do something with it. XML doesn't do things on its own. But when given to a program, the program may do whatever its programmer has decided based on the contents of the XML.In web context, a custom XML language would be most useful on the server if you use it as a templating system, or on the client if you're using it as a structured content holder, where the "structured content" is generated by an HTTP request.

Link to comment
Share on other sites

You'll need to use XML when you write code that interfaces directly with an XML interface.If you have control over both sides of an information exchange - such as AJAX, you should consider JSON, because it's much more compact and parses more quickly than XML.

Link to comment
Share on other sites

XML is also a popular format for data exchange for web services. For example, I recently used Amazon's REST web service and it basically gives me a bunch of XML based on the parameters I pass it and I parse that XML using php to display the data on my own site for my particular use. I've also heard that it's becoming more popular to expose your data through a web service so that developers can interact with the data via the API instead of giving all developers access to the database.

Link to comment
Share on other sites

You'll find that a lot of useful resources come as web services which use XML. Take Purolator's shipping estimate calculator for example, if you ever have to program for any kind of business that sells goods. Another example using e-commerce is third party credit card verification.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...