Reputation: 95
I was wondering is there any need to use XML for large web projects, say in a social networking site?
Currently am just coding in normal PHP and HTML files. If I use XML files is that going to provide any convenience, like enhancing the processing speed of docs or reduce coding weight?
I don't know XML by now, also tell is it too much different from HTML?
Upvotes: 2
Views: 1133
Reputation: 111521
Where HTML has a fixed set of tags with defined meaning, mostly relating to presentation, in XML you can define your own set of tags with meaning particular to your application or domain.
You probably don't need XML to get started building your social networking site, but down the road you could use it to export a user's social graph in a standard and readily processable form.
Do not look to XML for "enhancing processing speed or reducing coding weight." Look to it for standardized data exchange, especially for document-based data. (JSON will tend to work better for purely performance and coding weight goals; XML will work better for document-based data or where industry standard formats can be leveraged.)
Upvotes: 3
Reputation: 1226
XML is the same syntactically to xhtml, basically HTML but with certain extra constraints, it is not used to render web pages if that's what you're asking. (Unless you use XSLT)
Often used in Service Oriented Applications, you can use XML to provide your data to other services, apart from that, it's used in configuration. Imagine XML as a counterpart to JSON.
XML/JSON = Computer to Computer
HTML = Computer to Human
Upvotes: 2