XML facts for kids
![]() |
|
Filename extension |
.xml
|
---|---|
Internet media type |
application/xml text/xml |
Uniform Type Identifier (UTI) | public.xml |
UTI conformation | public.text |
Developed by | World Wide Web Consortium |
Type of format | Markup language |
Extended from | SGML |
Extended to | Numerous, including: XHTML, RSS, Atom, KML |
Standard | 1.0 (Fifth Edition) November 26, 2008 1.1 (Second Edition) August 16, 2006 |
Free format? | Yes |
The Extensible Markup Language (XML) is a special computer language. It helps organize and describe information. Think of it like putting labels on things so a computer knows what each piece of data is.
XML is similar to HTML, which you might know from websites. But XML is "extensible," meaning you can create your own labels (called "tags"). This makes it very flexible. The World Wide Web Consortium (W3C) created XML.
XML tells a computer what information is, but not how it should look. For example, it might say "this is a price" but not "show the price in red and bold." Other programs then use this organized information. To do this, they often use an API. An API is like a set of instructions that lets different computer programs talk to each other.
You can also write special rules for an XML document. These rules help make sure the document is set up correctly. One common way to do this is using something called DTD.
Contents
How XML Works: Basic Rules
XML uses special markers called "tags" to organize data. These tags are placed inside less than (`<`) and greater than (`>`) symbols.
Opening and Closing Tags
Most tags come in pairs: an opening tag and a closing tag.
- An opening tag looks like this:
<item>
. - A closing tag has a slash (`/`) before its name:
</item>
. - Everything between these tags is the "value" or "content" of that tag.
- For example,
<book>Harry Potter</book>
means "Harry Potter" is the value for the "book" tag.
Empty Tags
Sometimes, a tag doesn't have any content inside it. These are called "empty tags."
- You can write an empty tag like this:
<image />
. - The slash (`/`) before the `>` shows that it's an empty tag.
What XML is Used For
XML is used in many different areas because it's great for organizing and sharing data. Here are some examples of languages that are built using XML:
Text and Documents
- XHTML: This is a version of HTML that follows XML's strict rules. It helps make web pages more organized.
- DocBook: Used for writing technical documents and books.
- TEI: Helps scholars mark up texts for research.
=Images for kids
- SVG: Used for creating images that can be resized without losing quality. Think of logos or icons on websites.
- X3D: A language for describing 3D models and scenes.
- Collada: Helps different 3D design programs share information.
Maps and Location Data
- Geography Markup Language (GML): Used for geographical information, like maps.
- GPS Exchange Format (GPX): Stores information from GPS devices, like routes and waypoints.
- Keyhole Markup Language (KML): Used to display geographical data in programs like Google Earth.
Multimedia and Entertainment
- SMIL: Helps describe how different parts of a multimedia presentation (like video, audio, and text) should play together over time.
- MPEG-7: Used to describe multimedia content, making it easier to search and manage.
Other Uses
XML is also used for many other things, like:
- RSS: Used for web feeds, so you can get updates from websites or news sources.
- WAP/WML: Used for displaying content on older mobile phones.
See also
In Spanish: Extensible Markup Language para niños