If you’ve ever seen the .xml extension in your downloads folder and wondered what that is, you’re not alone.

Keep reading to learn what and XML file is, and how to open it both locally on your computer and in online editors.

What’s an XML file?

XML stands for Extensible Markup Language and was created by the W3C (World Wide Web Consortium) in the 90s.

Though XML, like HTML, is a human readable markup language, they serve very different purposes. HTML describes the structure of a web page and its content, and XML describes the structure of data.

XML provides programs, and more importantly, programmers, a standard, widely accepted format to transmit data across different systems. In that way, XML has more in common with JSON than it does with HTML.

While XML is no longer the preferred method for organizing and transmitting data, it still has its place. XML is still used in many legacy systems, and both RSS and SVG are both based on the XML format.

Here’s a simple example of an XML file and how it’s used to structure data:

<?xml version="1.0" encoding="UTF-8"?>
<fcc_merch>
   <item>
      <name>Triblend T-shirt</name>
      <price>$24.99</price>
      <description>Represent the freeCodeCamp community with pride in this jet-black Triblend T-shirt featuring the iconic "bonfire function call" logo.</description>
   </item>
   <item>
      <name>Cotton-Poly Pullover Hoodie</name>
      <price>$49.99</price>
      <description>Stay toasty and dress like a developer with this jet-black cotton-poly pullover hoodie.</description>
   </item>
   <item>
      <name>Ceramic Coffee Mug</name>
      <price>$14.99</price>
      <description>Toast to the developer community with your very own freeCodeCamp Bonfire Function Call mug.</description>
   </item>
</fcc_merch>

#xml #web-development #developer

What is an XML File? How to Open XML Files and the Best XML Viewers
2.35 GEEK