I am new to web programming and just started learning XML and AJAX. I am creating a social gaming website for my college project. I am confused at the point of using XML for AJAX in HTML5. As XHTML is replaced by HTML5 so is it ok to use XML or i should choose JSON (i know nothing about JSON but it is what I found in answers on web to the question related to choice between JSON and XML). My preference is XML because it is in my syllabus but I want to make sure that XML and HTML5 will not conflict.
- Anybody can ask a question
- Anybody can answer
- The best answers are voted up and rise to the top
You can encode the data sent to the server in any format you want and not interfere with the web page's standards.
The idiomatic thing to do is to just use JSON these days, but that is up to you.
It's also important to note that if you use a non HTML5 tag, the police aren't going to show up at your door and, unless your professor validates your site using a tool, he probably won't notice and it will render just fine.
Certain things in your page like