What is the difference between XML and SQL data storage?

In XML data storage, the data is stored in a file which represents an XML Schema of the data. To read the data, you have to pull and open the entire file in memory and use technics like xpath to get the data element you want. In SQL data storage, the data is stored in a database ( usually relational database). To read the data, you simple sent an SQL query to the database. The database management engine analysis the query and get the required data elements you ask for in your query which is finally sent to you as a reply.