Week 2 Exercise


1). What is Ajax?

Asynchronous JavaScript and XML or Ajax for short is new web development technique used for the development of most interactive website. Ajax helps you in making your web application more interactive by retrieving small amount of data from web server and then showing it on your application. Thus you can do all these things without refreshing your webpage. 

In other meaning  Ajax is:
Asynchronous :This means that when you send a request, you wait for the response to come back, but are free to do other things while you wait. The response probably won’t come back immediately, so you set up a function that will wait for the response to be sent back by the server, and react to it once that happens.
 
 
 2). How to Measure and Define a Well-formed XML

To define a well-formed XML document is that it matches the basic or minimum specifications for any XML. in other meaning tags starting with a  greater than bracket  and a lesser than bracket < > must have a matching once typed. furthermore any attributes within the opening tag element must be quoted either with "or'.Because XML is case sensitive program, the opening and closing elements must match. So open and close tags must be in the same case when a close tags is identified it must hold the same text value as the most recent start tag. in accordance, note that a well-formed XML and valid XML documents are two different meanings.


3).How to Check the Validity of  a XML Document


Valid XML Document

What is a Valid XML document to be exact, it is well informed and also matches criteria as laid out in DTD or Document Type Definition.Because it is typically specified in a DTD file which is reference at the top of the XML file. 

Furthermore if the XML does not contain Document Type Definition  information then there is no difference between a check for well-formed and a check for validity of a XML document.on my knowledgeable research that i have done It's important that XML files are syntactically correct. This is rather different from HTML, where by and large web browsers would tolerate a measure of badly formed code.

The checks of validity on an XML file work at two levels: check is well-formed  and check is valid. in additional you can use an xml parser which is a processor that reads an XML document and determines the structure and properties of the data in short description it's a (validity checker) to make sure that they are not violating the rules.