Difference Between XML and XAML

XML vs XAML

XML, or Extensible Markup Language, is a subset of the more complex SGML (Standard Generalized Markup Language). XML makes use of syntax tags that helps to identify the various data types in a file. XML is referred to as a metalanguage that describes other languages. It is part of the large markup language family that was created by the World Wide Web Consortium (W3C). XML, unlike HTML (another Markup Language), was made optionless so that the data remains uniform in different browsers. XML pages are much more flexible than HTML pages which will definitely help XML replace HTML in the future.

XAML, or Extensible Application Markup Language, is a declarative XML-based markup language that is part of the Microsoft suite. It helps in the visual presentation of an application developed in Microsoft Expression Blend. This application can either be created by hand or visually using Design View of Expression Blend. In both cases you end up writing XAML code. XAML allows you to initialize objects and set their properties using a hierarchical relationship. It uses the period notation to define the attribute as a property of the object. You can even build visible UI elements using XAML. XAML can seamlessly move around different tools like Visual Studio or Microsoft Expression Blend without any loss of data.

Differences:

1.All XAML documents are also valid XML documents, but the vice-versa case doesn’t hold true.

2.XML is a markup language whereas XAML is a declarative application language.

3.XML finds its use primarily in web applications in contrast to XAML which is used to design controls for Windows as well as web applications.

Summary:

1.XAML is a declarative application language that focuses on object definition, their properties, and their relationship between one another.

2.XML is a markup language created by W3C that is used to describe other markup languages.

3.XML is used in web publishing to create interactive pages, for web searching, and to automate certain web tasks. It finds use in e-commerce and helps in displaying information on wireless devices and cellphones.

4.XAML is used to create, edit, and reuse GUIs for Windows and certain web applications like Silverlight plug-ins.

5.XAML is currently available for only the Windows platform. It will be eventually moved to other platforms over a period of time. XML is set to replace HTML because of its flexibility.