What is XML Usage in Web Applications?

I was wondering if there is a need to use XML for large web projects, say on a social networking site?

Currently I am just coding in regular PHP and HTML files. If I use XML files, will this provide any convenience, such as speeding up document processing or reducing the weight of encoding?

I don’t know XML yet, am I also telling you that it is too different from HTML?

+3


source to share


2 answers


If HTML has a fixed set of tags with a specific meaning, mainly related to presentation, in XML, you can define your own set of tags with a meaning specific to your application or domain.

You probably don't need XML to get started building a social networking site, but along the way, you could use it to export a user's social graph in a standard and easily processed form.



Don't look at XML for "faster processing speed or less encoding weight". Look at this for standardized data exchange, especially for document based data. (JSON will perform better for purely performance and encoding weight purposes; XML will perform better for document-based data or industry standard formats.)

+3


source


XML is syntactically the same as xhtml, mostly HTML, but with some additional restrictions, it is not used to render web pages, if that's what you ask. (If you are not using XSLT )

Often used in service oriented applications, you can use XML to expose your data to other services, and it is also used in configuration. Think of XML as analogous to JSON.



  • XML / JSON = computer to computer

  • HTML = human computer

+2


source







All Articles