Q2. Give an example where XML could be preferred over HTML.
Ans. XML is preferred in situations where you need to access specific information. Consider a situation in which you need to extract the zip code from the given address. In such cases, you need to use XML as HTML does not allow you to access any specific part of the text.